dynamic number format

W

whitepa05

I have a vlookup formula that will return different data based on a user
input. The data will either be a percentage or an integer. How can I
conditionally format the cell so that the number is formatted properly, or
that the vlookup returns the value and formats?
 
J

JE McGimpsey

You can't use conditional formatting to change number format.

However, if all your percentages are non-zero and less than 1, you can
use Custom Format:

Format/Cells/Number/Custom...

[<=0]0;[<1]0.00%;0
 
Top