Convert a number like 2.2B into 2,200,000,000 in Apple Numbers?

Hello all!! Q: How would I convert a number like "2.2B" (2.2 Billion) into the actual number; 2,200,000,000? I need to do this in oder to perform addition calculations using the long form of the number, as Numbers will not recognise 2.2B. I tried the "Find and Replace f(x), but the program seeks out all of the "Bs" in the spreadsheet and then it makes a mess. Thanks in advance.

Posted on Feb 17, 2021 8:11 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 17, 2021 11:48 PM

Here's one way, using a lookup table and VLOOKUP.

Table 2, on the right, contains the single letter symbols for Billion, Million and Thousand, and the formula crearting the corresponding values in column B, shown below Table 2 in the for it takes in cell B2.

In B3, the 9 is replaced with 6, and in B4, with 3.


Table 1, on the left, contains the longer formula below both tables, shown as entered in cell A2 of Table 1, then filled down to A5.


Row 6 of this table is left empty as I had'nt added a 'switch' to prevet calculating until a value was entered in A6.


What it does:


VALUE(LEFT(A2,LEN(A2)−1))×
VALUE(VLOOKUP(RIGHT(A2,1),Table 2::A:B,2,0))


VALUE(LEFT(A2,LEN(A2)-1))

LEN(A2) returns the LENgth of the text value in A2 in characters (4)

-1 subtracts 1 from that value. (3)

LEFT(A2,3) gets the leftmost 3 characters of the text in A2 ( 2.2 )

VALUE returns the numeric value represented by those text characters (two and two tenths)


is the multiplication sign. When entering a formula, use the multiplication operator ( * ). Numbers will immediately change

it to the muliplication sign, but will not accept or recognize the multiplication sign entered directly into a formula.



VALUE(VLOOKUP(RIGHT(A2,1),Table 2::A:B,2,0))


RIGHT(A2,1) gets the last character fro the text value in A2, and hands it to VLOOKUP.

VLOOKUP searches for that character in column A of TA=able 2::A:B, finds it,, returns the value from the same row of the second column of the lookup table (Table 2), and hands that to VALUE


× multiplies the Value to its left by the VALUE to its right, and returns the result to its cell, B2 of Table 1.


Regards,

Barry

8 replies
Question marked as Top-ranking reply

Feb 17, 2021 11:48 PM in response to ScottiePips

Here's one way, using a lookup table and VLOOKUP.

Table 2, on the right, contains the single letter symbols for Billion, Million and Thousand, and the formula crearting the corresponding values in column B, shown below Table 2 in the for it takes in cell B2.

In B3, the 9 is replaced with 6, and in B4, with 3.


Table 1, on the left, contains the longer formula below both tables, shown as entered in cell A2 of Table 1, then filled down to A5.


Row 6 of this table is left empty as I had'nt added a 'switch' to prevet calculating until a value was entered in A6.


What it does:


VALUE(LEFT(A2,LEN(A2)−1))×
VALUE(VLOOKUP(RIGHT(A2,1),Table 2::A:B,2,0))


VALUE(LEFT(A2,LEN(A2)-1))

LEN(A2) returns the LENgth of the text value in A2 in characters (4)

-1 subtracts 1 from that value. (3)

LEFT(A2,3) gets the leftmost 3 characters of the text in A2 ( 2.2 )

VALUE returns the numeric value represented by those text characters (two and two tenths)


is the multiplication sign. When entering a formula, use the multiplication operator ( * ). Numbers will immediately change

it to the muliplication sign, but will not accept or recognize the multiplication sign entered directly into a formula.



VALUE(VLOOKUP(RIGHT(A2,1),Table 2::A:B,2,0))


RIGHT(A2,1) gets the last character fro the text value in A2, and hands it to VLOOKUP.

VLOOKUP searches for that character in column A of TA=able 2::A:B, finds it,, returns the value from the same row of the second column of the lookup table (Table 2), and hands that to VALUE


× multiplies the Value to its left by the VALUE to its right, and returns the result to its cell, B2 of Table 1.


Regards,

Barry

Feb 18, 2021 12:44 AM in response to ScottiePips

I would have thought there would be some tricky way other than functions but I haven't found it. Just for fun I did it with a different formula using some of the newer funtions.


If the numbers are in column A,

=IFERROR(REGEX.EXTRACT(A,"[0-9.,]+"),0)*10^XLOOKUP(RIGHT(A,1),{"T","B","M","K"},{12,9,6,3},0,0)


This handles numbers ending in T B M or K and just plain numbers. The number can contain a decimal point and comma separators. The result will be zero if there is no number. If used on text that just happens to contain a number, it will give a result based on the first number found.


I am not sure if the use of curly brackets to create an array in a function is documented or not but it has worked since at least Numbers '09.

Feb 18, 2021 8:02 PM in response to ScottiePips

You can also do this in one cell with basic functions, like this:




With the value A3, the formula would be:


=LEFT(A3,LEN(A3)−1)*1000^FIND(RIGHT(A3,1),"KMBT")


If you are using different abbreviations than "K" for thousands, "M" for millions, "B" for billions, "T" for trillions, then just replace the "KMBT" with the ones you are using, in ascending order.


SG

Feb 19, 2021 5:00 AM in response to SGIII

SG's formula seems the most elegant. I modified it to accept numbers that have no modifying letter:


=IFERROR(LEFT(A3,LEN(A3)−1)×1000^FIND(RIGHT(A3,1),"KMBT",1),A3)


Empty cell = 0

Text or non-numeric = the same text or non-numeric

Number with no modifying letter = the number

Number with modifying letter = number x the correct power of 1000

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Convert a number like 2.2B into 2,200,000,000 in Apple Numbers?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.