Change Cell Numerical Format based on value it brings in formula from other cells

gmooney

Board Regular
Joined
Oct 21, 2004
Messages
168
Hello,

Hopefully Simple question here:

I have a formula in cell D18 that basically states the following:

=IF(Display1!$D$71=1,'Budget Data'!F10,IF(Display1!$D$71=2,'Budget Data'!F11,'Budget Data'!F12))

F10, F11, and F12 are all currently formatted as Number, Currency no decimal and currency 2 decimal.

I want cell D18 to be formatted as whatever the formula returns from the correct cell format of F10, F11, or F12?

Any suggestions?
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,407
Hi,
You can use Conditional Formatting creating three rules, ie

1st rule
=Display1!$D$71=1
pick the same format of Budget Data F10

2nd rule
=Display1!$D$71=2
pick the same format of Budget Data F11

3rd rule
=Display1!$D$71=3
pick the same format of Budget Data F12

M.
 

Misca

Well-known Member
Joined
Aug 12, 2009
Messages
1,667
You can't change the numeric format of a cell with a formula but if the result doesn't have to be a numeric value you can use the text-function to return the value in desired format as a text.

Another workaround would be to use the camera tool to display the desired numberformat on top of the actual cell and have the cell return just the value without the formatting. This way you could use the value in further calculations easily. Otherwise the currency symbol might cause you trouble if you tried to use the text value in calculations.
 

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,407
Sorry, the 3rd formula is not correct

Try

3rd rule
=AND(Display1!$D$71<>1,Display1!$D$71<>2)
pick the same format of Budget Data F12

M.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,511
Messages
5,596,581
Members
414,079
Latest member
Frills

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
Top