Have MS Excel worksheet with approximately 50,000 records that have a column (column AC) containing abbreviated numbers such as $100K.
I would like to convert the data within this column to the long format such as 100000.
Have tried several approaches including the following;
Creating two helper columns to the immediate right of column AC and 1) replacing the "$" with a blank and displaying the data without the symbol $ in the first helper column (column AD) using the REPLACE function such as;
Then, in the second helper column, column AE, I insert a formula such as
This initially appeared to work but involved multiple steps.
[Bold]
Any insight as to a VBA approach whereby I select a column containing the abbreviated data and have it converted to the long format?
[/Bold]
Currently experimenting with VBA such as;
I would like to convert the data within this column to the long format such as 100000.
Have tried several approaches including the following;
Creating two helper columns to the immediate right of column AC and 1) replacing the "$" with a blank and displaying the data without the symbol $ in the first helper column (column AD) using the REPLACE function such as;
Code:
=REPLACE(AC,1,1,"")
Then, in the second helper column, column AE, I insert a formula such as
Code:
=LEFT(AD2,LEN(AD2)-1 * IF(RIGHT(AD2)="K",1000,10000)
This initially appeared to work but involved multiple steps.
[Bold]
Any insight as to a VBA approach whereby I select a column containing the abbreviated data and have it converted to the long format?
[/Bold]
Currently experimenting with VBA such as;
Code:
Sub ChangeFromAbbvToLongFmt()
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
'Pseudocode
REPLACE(AC,1,1,"")
Rng.Value = =LEFT(AD2,LEN(AD2)-1 * IF(RIGHT(AD2)="K",1000,10000)
Next
End Sub