upobDaPlaya
asked on
Adding a comma within a text string based on a condtion
I have a column of text. Within the column for some cells I have embedded numbers. My goal is if I find a cell where a space is found between two numbers I want to add a comma. An example is below. My thought was to use the InStr function within VBA (I already have an existing loop that goes thru the column), but this function only seems like a solution if I wanted to add a comma once I found a space. However, I ONLY want to add a comma if a space is found within the string AND if the space is found between 2 numbers.
Current
JinDandy
Favor18 500Bye
Chuckwagon100 000sick
JeffMandy
Desired
JinDandy
Favor18,500Bye
Chuckwagon100,000sick
JeffMandy
Current
JinDandy
Favor18 500Bye
Chuckwagon100 000sick
JeffMandy
Desired
JinDandy
Favor18,500Bye
Chuckwagon100,000sick
JeffMandy
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER