format cell

K

kg

I want to put a number, hidden, in a cell so taht all the user has to do is
enter an x rather than the number. THe hidden number becomes part of my
eventual sum in another column. I don't want to just enter the number for
accuracy reasons, I only want the "X" in the cells. Any ideas?
 
J

jamescox

Exactly what you are asking for can't be done in Excel - there i
absolutely no provision in Excel that would allow two values to b
stored in the same cell - visible or not.

What you can do is have a column in which you can have the user ente
an x and then in another column have a formula that checks the firs
cell for an entered x and if it finds one, evaluates to a number tha
will become part of your eventual sum.

Make Col B the column in which an x is to be entered. If the colum
which will be summed is Col C, the formula for Col C cells
specifically cell C3 - would be:

=IF(B3="x",64,0)

assuming that the number you want to be eventually summed if cell B
has an x is 64.

Note however, that while this is what you asked for - IF your use
enters X instead of x, this breaks. To take care of that, use

=IF(UPPER(B3)="X",64,0)

so the formula would work if the user enters x or X. But what if th
user types c or Z - keys close to the X key. You could set it up s
that ANY entry in B3 would include 64 in your evenual sum with th
following version

=IF(ISBLANK(B3),0,64)

note that since the ISBLANK function will return True if B3 is blan
(empty) the order of the two values of the IF have been swapped. Yo
could keep them in the same order by using the NOT function

=IF(NOT(ISBLANK(B3)),64,0)

but that requres an extra function evaluation and doesn't seem to mak
the formula any clearer.

Hope this helps... :Bg
 
Top