View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default IF-THEN & Conditional Format Label

A formula cannot change the format of a cell.

Why not leave things as they are but unhide column B? You can always
apply conditional formatting to column B such that if column A is
empty then use a white foreground font - the cell will appear blank
when A is blank.

Pete

On Apr 18, 2:51*am, Tampa-Terry wrote:
Hi! *I'm struggling with how to put the correct unit of measure on a number. *
In some cases the unit of measure is grams. *In other cases, the unit of
measure is mililiters. *I was planning on having a hidden column that would
hold the letter "g," the letters "mL" (or that might *be empty --
ACCIDENTALLY, of course).

Example

A1 = 6, B1 = mL
A2 = 10, B2 = g

Column B would be hidden (not visible)

An IF-THEN formula gets me part of the way. *But how do I do the Custom
Format label like you'd see if you clicked on the following ...

Format -- Cells -- Number -- Custom -- 0.0 "g"
-or-
Format -- Cells -- Number -- Custom -- 0.0 "mL"

I think I can figure out the IF-THEN part of things. *It's just the labeling
I'm struggling with. *I need to be able to do some math on the contents of
cells in Column A.

If anyone is able to point me in the right direction, it would be much
appreciated