Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

VBA Excel Does a Function Like this exist?

  1. Aug 8, 2009 #1
    GO TO POST #2 for new question please


    I hate to start a thread just for this, but my Googling skills SUCK today!

    Is there a function that returns what character is in a given position within a string?

    For example,

    Dim MyName As String
    MyName = "SaladSamurai"

    FunctionINeed(2)


    Then it would return "a"

    I could write something...but I hate to reinvent the wheel on this one.

    Thanks!
     
    Last edited: Aug 8, 2009
  2. jcsd
  3. Aug 8, 2009 #2
    Nevermind, I am a moron. I have been using it all day! Mid ..... idiot......

    BUT, while you are reading this, unrelated question:

    You know in XML or other mark up languages how they wrap some thing with those command things (yes, I realize that I am butchering the language here)? For example

    <ABC>X</ABC> What is the name of the entire "<ABC>" object? Is it a 'command' or a what?

    I just want to name my function appropriately. It grabs the '<'and '>' and whatever is in between.
     
    Last edited: Aug 8, 2009
  4. Aug 8, 2009 #3

    Math Is Hard

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    yeah, Mid() should do the trick.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: VBA Excel Does a Function Like this exist?
  1. Excel macro's and VBA (Replies: 18)

Loading...