Converting Text to Numbers

SashaGorgov

New Member
Joined
Jun 1, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hello!

I have a bunch of data that is listed vertically as text in the following format: '£3.4M' or '£287K' and sometimes '£6.9M (£7.4M)' with the brackets denoting a revised sum.

I couldn't think of a way to convert this to numbers so I can perform numerical analysis, just wondering if anyone has any ideas?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
MrExcelPlayground9-1.xlsx
AB
1$3.4M$ 3,400,000
2$287K$ 287,000
3$6.9M ($7.4M)$ 7,400,000
4550 (650)$ 650
Sheet16
Cell Formulas
RangeFormula
B1:B4B1=LET(z,ISNUMBER(SEARCH("(",A1)),x,IF(z,RIGHT(A1,LEN(A1)-SEARCH("(",A1)),A1),a,CODE(MID(x,SEQUENCE(LEN(x)),1)),b,FILTER(a,(a>45)*(a<58)*(a<>47)),c,VALUE(CONCAT(CHAR(b))),d,ISNUMBER(SEARCH("M",x)),e,ISNUMBER(SEARCH("K",x)),f,IF(d,c*1000000,IF(e,c*1000,c)),f)
 
Upvote 0
T202206a.xlsm
ABCDE
1K1,000
2£3.4M3,400,000m1,000,000
3£287K287,000
4
3a
Cell Formulas
RangeFormula
B2:B3B2=LEFT(MID(A2,2,99),LEN(A2)-2)*LOOKUP(RIGHT(A2,1),$D$1:$E$2)
 
Upvote 0
MrExcelPlayground9-1.xlsx
AB
1$3.4M$ 3,400,000
2$287K$ 287,000
3$6.9M ($7.4M)$ 7,400,000
4550 (650)$ 650
Sheet16
Cell Formulas
RangeFormula
B1:B4B1=LET(z,ISNUMBER(SEARCH("(",A1)),x,IF(z,RIGHT(A1,LEN(A1)-SEARCH("(",A1)),A1),a,CODE(MID(x,SEQUENCE(LEN(x)),1)),b,FILTER(a,(a>45)*(a<58)*(a<>47)),c,VALUE(CONCAT(CHAR(b))),d,ISNUMBER(SEARCH("M",x)),e,ISNUMBER(SEARCH("K",x)),f,IF(d,c*1000000,IF(e,c*1000,c)),f)
Wow, this is amazing. Thank you so much!
 
Upvote 0

Forum statistics

Threads
1,214,994
Messages
6,122,633
Members
449,092
Latest member
bsb1122

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top