"IF statement"

  • Thread starter Thread starter kukarooza
  • Start date Start date
K

kukarooza

I'm new at Excel and I'm sure this is probably a basic question, s
please forgive my ignorance. My question is this... I have one colum
that's numbered from 1-100 (one starting in A:1 and 100 ending i
A:100). My second column is also from 1-100. In this column however
I have several items listed.

For example,
A:1 has 1 in it, and B:1 has Apples in it.
A:2 has 2 in it, and B:2 has Grapes in it.
etc. with a different fruit in the B column all the way down to lin
100.

What I need to do is create a formula where I can enter a numbe
(1-100) in column C and in column D, the name of a fruit that's relate
to that number should be inserted. I was successful in doing this wit
the IF statement until I passed the 7-8 rule. After that, nothin
worked.

Is there another way I can do this or am I out of luck?

Thanks
 
In D1 enter this:

=VLOOKUP(C1,A1:B100,2,0)

Now, just enter the number you wish to lookup in cell C1.
 
I tried the =VLOOKUP(C1,A1:B100,2,0) statement and it worked... thanks!
but when I copied the formula to the other 99 rows in the column, th
output shows #N/A until I put a number in the desired C column. Can
make it to where the response column doesn't show #N/A, short o
putting a number in column C? Basically, what I'd like the respons
column to show is nothing unless I put a number in the C row jus
beside it. Then, if a number is there, the result (response would sho
up), otherwise, I'd like the response to be blank. Thanks
 
I tried the =VLOOKUP(C1,A1:B100,2,0) statement and it worked... thanks!
but when I copied the formula to the other 99 rows in the column, th
output shows #N/A until I put a number in the desired C column. Can
make it to where the response column doesn't show #N/A, short o
putting a number in column C? Basically, what I'd like the respons
column to show is nothing unless I put a number in the C row jus
beside it. Then, if a number is there, the result (response would sho
up), otherwise, I'd like the response to be blank. Thanks
 
I don't know if this repost is an indication that you're still having a
problem, even when using the *other* suggested formulas.

If you are, part of it might be that since you're *copying* these formulas,
you'll need an absolute address for your data list.

Try these:

=IF(ISNA(MATCH(C1,$A$1:$A$100,0),"",VLOOKUP(C1,$A$1:$B$100,2,0))

OR

=IF(C1<>"",VLOOKUP(C1,$A$1:$B$100,2,0),"")
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


I tried the =VLOOKUP(C1,A1:B100,2,0) statement and it worked... thanks!,
but when I copied the formula to the other 99 rows in the column, the
output shows #N/A until I put a number in the desired C column. Can I
make it to where the response column doesn't show #N/A, short of
putting a number in column C? Basically, what I'd like the response
column to show is nothing unless I put a number in the C row just
beside it. Then, if a number is there, the result (response would show
up), otherwise, I'd like the response to be blank. Thanks!
 
Back
Top