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

gmooney

Active Member
Joined
Oct 21, 2004
Messages
252
Office Version
  1. 365
Platform
  1. Windows
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?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
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.
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,530
Messages
6,114,162
Members
448,554
Latest member
Gleisner2

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