VBA Excel Does a Function Like this exist?

  • Thread starter Thread starter Saladsamurai
  • Start date Start date
  • Tags Tags
    Excel Function
Click For Summary
SUMMARY

The discussion centers around the use of the Mid function in VBA Excel to extract a character from a specific position within a string. The user, after initially expressing frustration, realizes that the Mid function is indeed the solution they have been using. Additionally, there is a query regarding the terminology for XML tags, specifically asking what the entire "" object is called, which is identified as a tag. The user seeks clarity on naming conventions for their own function that processes XML-like strings.

PREREQUISITES
  • Understanding of VBA (Visual Basic for Applications) programming
  • Familiarity with string manipulation functions in VBA
  • Basic knowledge of XML structure and terminology
  • Experience with function creation in VBA
NEXT STEPS
  • Explore advanced string manipulation techniques in VBA
  • Learn about XML parsing in VBA using MSXML library
  • Research best practices for naming conventions in programming
  • Investigate the use of Regular Expressions in VBA for string processing
USEFUL FOR

VBA developers, programmers working with XML data, and anyone interested in string manipulation techniques in Excel.

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.
 

Similar threads

  • · Replies 18 ·
Replies
18
Views
6K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 17 ·
Replies
17
Views
4K
  • · 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
2K
Replies
1
Views
6K