Welcome to Our WirelessAdvisor Community!

You are viewing our forums as a GUEST. Please join us so you can post and view all the pictures.
Registration is easy, fast and FREE!

Use it or lose it. I lost nearly it.

Discussion in 'The Roaming Zone' started by KevinJames, Apr 28, 2015.

  1. KevinJames

    KevinJames WA's 1st retired mod
    Senior Member

    Joined:
    Oct 2, 2001
    Messages:
    4,044
    Likes Received:
    739
    Location:
    Central Valley NorCA
    My Phone:
    Samsung S7-Edge
    Wireless Provider(s):
    AT&T & Verizon
    It has been more than 4 years since I've done any VBA programming in Excel. I didn't realize how much I'd forgotten. A pro bono project I accepted took much longer than I expected. I had to go back to my manuals for even some basic syntax. It really discouraged me. The project shouldn't have taken more than 15 minutes. It took me no less than 5 hours. But the challenge was so mentally invigorating and enjoyable.

    Some gent that is an instructor for a mid-west university apparently teaches what appeared to be French. In his mind, some analytics of language proficiency was the size of words students chose to write in sentences. After placing a paragraph of text in a cell, he wanted a formula that would count only words that were equal to or greater than (=>) 6 characters. I immediately realized that no inherent, intrinsic functions in Excel could accomplish that and even if it were possible, the resulting formula would be unwieldy.

    So set about to create a UDF (User-Define Function) using VBA. I finished it last night and shipped it off. The instructor quickly responded that it was PERFECT. (Yes, he used all caps.) It really gave me a sense of accomplishment and being helpful to someone in need. Normally I would have asked for payment, but I was just happy to get my brain cells active again. Using the UDF I created, the user only needed to enter two variables, 1) the cell reference where the phrase was located, and 2) the shortest length of word to check for. It looked like this....

    =WORDCOUNT([CellReference], [WordSize])

    So, =WORDCOUNT(A1,6) would return the count of all words in cell A1 whose length was 6 characters or longer.

    Why am I posting this here? Hey, its the Off-Topic forum and it was an accomplishment I wanted to share.

    addendum: I just realized I transcribed words in the title. My brain has been doing funny things lately.
     
    our3rotts likes this.
  2. JFB

    JFB Gold Senior Member
    Administrator Super Moderator

    Joined:
    Jan 1, 1998
    Messages:
    5,024
    Cell Tower Picture Gallery:
    7
    Likes Received:
    816
    Location:
    New Jersey, USA
    My Phone:
    Samsung S21 5G
    Wireless Provider(s):
    Mint Mobile
    That is interesting. Coincidentally I just ran though a quick online tutorial on Regular Expressions and reading your post I thought that Regex could be used on that problem. I don't know VBA though.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dmapr

    dmapr Silver Senior Member
    Senior Member

    Joined:
    Dec 4, 2006
    Messages:
    4,468
    Likes Received:
    1,181
    Location:
    Bay Area, CA
    My Phone:
    Pixel XL
    Wireless Provider(s):
    Verizon Wireless; MTS
  4. KevinJames

    KevinJames WA's 1st retired mod
    Senior Member

    Joined:
    Oct 2, 2001
    Messages:
    4,044
    Likes Received:
    739
    Location:
    Central Valley NorCA
    My Phone:
    Samsung S7-Edge
    Wireless Provider(s):
    AT&T & Verizon
    @JFB Regular Expressions was intellectually exciting to me. I studied it for a while and loved it. In my lifetime I've learned no less than 3 full-fledged programming languages (I even got certified as an RPG pgmr). I also learned some scripting languages for rudimentary DOS commands. I wrote a file transfer batch file for transferring data between a mainframe and a DOS-based PC.

    But now, with all the huge dings on my brain (chemo, sleep apnea, chronic illness), it is amazing I can even remember how to tie my shoes (and sadly, its no exaggeration). I have days where I get lost in the middle of my sentence and completely forget what I was saying. I'm told it ain't Alzheimer's just yet but some days it sure feels like it. Then I have days like yesterday where I had such clarity of mind that allowed me to create a UDF. For most people this would be nothing to boast about. For me, it was truly an accomplishment.
     
    JFB likes this.
  5. budney

    budney Resident Headbanger
    Super Moderator Senior Member

    Joined:
    Jan 3, 2003
    Messages:
    5,861
    Cell Tower Picture Gallery:
    14
    Likes Received:
    341
    Location:
    Eugene, OR
    My Phone:
    iPhone 6s+
    Wireless Provider(s):
    AT&T
    Congrats KJ!!! It is amazing how fast we forget things. I surprised my self a few weeks ago helping another student with some Python. I took the intermediate class in the fall, but the last two terms I have been learning C++.

    P.S. regular expressions are evil!
     
  6. our3rotts

    our3rotts An Iowa Gurl...
    Senior Member

    Joined:
    Jun 5, 2003
    Messages:
    862
    Likes Received:
    40
    Location:
    E. Iowa
    My Phone:
    Google Pixel
    Wireless Provider(s):
    VZN - 4G
    After reading this, I know I couldn't write a VBA anymore if I wanted to! I think I'm inspired to start spending an hour of everyday learning code again...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    KevinJames likes this.
  7. KevinJames

    KevinJames WA's 1st retired mod
    Senior Member

    Joined:
    Oct 2, 2001
    Messages:
    4,044
    Likes Received:
    739
    Location:
    Central Valley NorCA
    My Phone:
    Samsung S7-Edge
    Wireless Provider(s):
    AT&T & Verizon
    budney likes this.

Share This Page

Copyright 1997-2023 Wireless Advisor™, LLC. All rights reserved. All registered and unregistered trademarks are the property of their respective holders.
WirelessAdvisor.com is not associated by ownership or membership with any cellular, PCS or wireless service provider companies and is not meant to be an endorsement of any company or service. Some links on these pages may be paid advertising or paid affiliate programs.

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice