VBA Excel Does a Function Like this exist?

  • Thread starter Thread starter Saladsamurai
  • Start date Start date
  • Tags Tags
    Excel Function
Click For Summary
A user seeks a function to retrieve a character from a specific position within a string, exemplified by wanting to extract the second character from "SaladSamurai." They initially express frustration over their inability to find this information online but later realize they have been using the appropriate function, Mid(), throughout the day. The discussion then shifts to a separate question about XML and markup languages, specifically asking for the correct terminology for the opening tag, such as "<ABC>". The user is looking for an appropriate name for their function that captures the tag and its contents.
Saladsamurai
Messages
3,009
Reaction score
7
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:
Technology news on Phys.org
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:
yeah, Mid() should do the trick.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 18 ·
Replies
18
Views
6K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 0 ·
Replies
0
Views
1K
Replies
1
Views
5K