LittleGriff
New Member
- Joined
- Jan 13, 2012
- Messages
- 11
Hello! I have been working on a report, manipulating and formatting various features using VBA. I received a request I haven't heard before.
The exported file contains several columns that contain percentage-formatted values of three or four digits. I'm being asked to join those with text from adjoining text columns, and format the numeric value as a percentage. Of course, when I do the join the percentage is converted to decimals and becomes a string.
The only thing I can think of to try is: find a way to convert the percentage to a string WITH the decimal and % sign in the right places before I do the join, but the numbers in those columns vary widely -- so I can't find and replace individual values. I'm no expert on wildcards, or RegEx, if that's the solution.
Here's a sample of what I get in the raw worksheet:
1.75% (formatted as Percentage) | Of the original amount (this text is in a separate column)
Here's what I get when I do the join:
.0175 (Of the original amount) | (joined into a single cell and I add the parens to the string)
Here's what I'm being asked for:
1.75% (Of the original amount)
Is this even possible?
Thank you so much!
The exported file contains several columns that contain percentage-formatted values of three or four digits. I'm being asked to join those with text from adjoining text columns, and format the numeric value as a percentage. Of course, when I do the join the percentage is converted to decimals and becomes a string.
The only thing I can think of to try is: find a way to convert the percentage to a string WITH the decimal and % sign in the right places before I do the join, but the numbers in those columns vary widely -- so I can't find and replace individual values. I'm no expert on wildcards, or RegEx, if that's the solution.
Here's a sample of what I get in the raw worksheet:
1.75% (formatted as Percentage) | Of the original amount (this text is in a separate column)
Here's what I get when I do the join:
.0175 (Of the original amount) | (joined into a single cell and I add the parens to the string)
Here's what I'm being asked for:
1.75% (Of the original amount)
Is this even possible?
Thank you so much!