Cell Format

  • Thread starter Thread starter bforster1
  • Start date Start date
B

bforster1

Is there a way to have a cell format based on contents of an i
statement...

Example

if(C1="Input",and(C3,Format $#.##),if(C1="% of Revenue",and(C5,Forma
#.##%),na)

I want the If statement to test a condition, return contents of th
correct cell and format automatically.

Any help is appreciated
 
You can't change the format of the cell with a formula, but you could use a
formula like:

=IF(C1="input",TEXT(C3,"$#.##"),IF(C1="% of revenue",TEXT(C3,"#.##%"),C3))

You can also check some formats via:
=cell("format",C3)

See excel's help for the details.
 
Back
Top