IF Function

  • Thread starter Thread starter jrichardson
  • Start date Start date
J

jrichardson

I am using a combo box to put text into a cell A1. I would then like t
use the If function to enter a number into cell A2 based on what wa
selected in A1. I have only been able to get the IF function to wor
with numbers is possible to make it recognise text
 
Yes you can do it by using "" in the text, for example, my
input cell is A1, I put this formula in cell B1:

=IF(A1="A",1,0)

If you need more sophiticated comparisons you can use
string functions as the logical argument (like EXACT,
FIND, etc)

HTH,
Felipe

-----Original Message-----

I am using a combo box to put text into a cell A1. I would then like to
use the If function to enter a number into cell A2 based on what was
selected in A1. I have only been able to get the IF function to work
with numbers is possible to make it recognise text?


------------------------------------------------

~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step
guide to creating financial statements
 
In A2 enter =IF(A1="qwerty",123,"Not qwerty")

OR perhaps a VLOOKUP in A2

=VLOOKUP(A1,$G$1:$H$5,2,FALSE)

with text in column G and corresponding numbers in column H

Gord Dibben XL2002
 
Thanks very much for the prompt reply. Both solutions work which leave
me with the pleasant choice of two options.

J
 
Back
Top