IF Function

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
 
F

Felipe

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?


------------------------------------------------
[/url]
~~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
 
G

Gord Dibben

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
 
J

jrichardson

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

J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top