Number to Text with Thousand Separator and Two Decimal Numbers

ellatrj

New Member
Joined
Jan 12, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there
I tried to search in the forum if it has already been asked, but couldn't find it. So sorry if it has been answered, kindly post the link to it.
Otherwise please help with this question:

I have numbers from 0- 1'000'000.00 and I tried the following formula:

=TEXT(ROUNDUP(XLOOKUP(@$D:$D;'Sum up'!$A:$A;'Sum up'!B:B;"0";0)*1);2);"#'##0.00")

but then I have the following problems:

numbers under 1000 are formatted like this, with a leading thousand separator: '100.00
'10.00
'0.00

and numbers over million like this: 1234'000.00 , so one separator is missing.

How can I adjust my formula above to get rid of these two problems?

Many thanks in advance!

I want it like in the table below:

1673523883566.png
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Excel Formula:
=TEXT(IF(ROUNDUP(XLOOKUP(@$D:$D,'Sum up'!$A:$A,'Sum up'!B:B,"0",0)*1)<1000000, ROUNDUP(XLOOKUP(@$D:$D,'Sum up'!$A:$A,'Sum up'!B:B,"0",0)*1),"#,##0.00"), ROUNDUP(XLOOKUP(@$D:$D,'Sum up'!$A:$A,'Sum up'!B:B,"0",0)*1),"#,##0,,")
 
Upvote 0
Hey aaewalsh, thanks for the quick response, but unfortunately I get "you have entered too many arguments for this function"...could you troubleshoot where I have to correct something?:

=IF(ROUNDUP(XLOOKUP(@$D:$D;'Sum up'!$A:$A;'Sum up'!B:B;"0";0)<1000000;
ROUNDUP(XLOOKUP(@$D:$D;'Sum up'!$A:$A;'Sum up'!B:B;"0";0);"#'##0.00");
ROUNDUP(XLOOKUP(@$D:$D;'Sum up'!$A:$A;'Sum up'!B:B;"0";0);"#'##0,,"))
 
Upvote 0
Try using the following format instead of "#'##0.00":
Excel Formula:
=TEXT(...,"[<1000]#0.00;[<1000000]#'###.00;#'###'###.00")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,376
Members
449,080
Latest member
Armadillos

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