ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF statement help... (https://www.excelbanter.com/excel-discussion-misc-queries/68565-if-statement-help.html)

killertofu

IF statement help...
 

I am trying to make a check for codes, so that if the number code is
already assigned to something it will show "USED" next to it.

My formula now is, A2=IF(A1=0,"USED","UNUSED"). That means that if
there is a number in A1, then A2 will show USED, if not, then UNUSED.
My problem is, that if A1 is left blank, then A2 is left blank. I
still want it to say UNUSED even if it is blank.

Furthermore, if someone can tell me how I can have A2 check for
anything in A1, not just =0 numbers. That way, if I wanted to have A2
check for text, it would tell me USED if there was text in A1, and
UNUSED if it was empty.

Thanks.


--
killertofu
------------------------------------------------------------------------
killertofu's Profile: http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=506989


daddylonglegs

IF statement help...
 

Try

=IF(LEN(A1),"USED","UNUSED")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=506989


killertofu

IF statement help...
 

genius... pure.


--
killertofu
------------------------------------------------------------------------
killertofu's Profile: http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=506989



All times are GMT +1. The time now is 04:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com