ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup problem (https://www.excelbanter.com/excel-worksheet-functions/88905-vlookup-problem.html)

Blade2304

Vlookup problem
 

I have a data sheet that contains a list of footballers (soccer) names
(i4:i35). Each time they score a goal i enter a 1 by the side of there
name, then a 2 when they get a second etc. In a second data sheet i use
data validation to allow people to choose anyone of these players eg
ab4= the list of players. When a player scores i want their number of
goals to appear in this second sheet eg in ac4, but obviously this
depends on which player has been chosen from the list in ab4. I have
tried using if statements within if statements but you can only have a
maximum of 7 'ifs' eg
=if(ab4="john",$j$4,if(ab4="dan",$j$5,if(ab4="ron" ,$j$6,0))). I have
tried using Vlookup by doing =VLOOKUP(AB4,i4:i35,2) where the goals
scored are my second column and when i choose the first person in the
list in ab4 the value that is returned in ac4 is 0 when it should be 1
since this is what i entered in j4, please help!!!


+-------------------------------------------------------------------+
|Filename: Copy of World Cup 2006.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4770 |
+-------------------------------------------------------------------+

--
Blade2304
------------------------------------------------------------------------
Blade2304's Profile: http://www.excelforum.com/member.php...o&userid=33492
View this thread: http://www.excelforum.com/showthread...hreadid=542610


Kevin Vaughn

Vlookup problem
 
It seems to me your biggest problem is that in your look up range, you are
only referencing 1 column, but trying to get information from the second
column (j)
But I would also add a false argument so that it would find exact matches.
Something like this (note, I used A4 instead of AB4 as I didn't really want
to scroll all the way ...)

=VLOOKUP(A4,I4:J35,2,FALSE)

--
Kevin Vaughn


"Blade2304" wrote:


I have a data sheet that contains a list of footballers (soccer) names
(i4:i35). Each time they score a goal i enter a 1 by the side of there
name, then a 2 when they get a second etc. In a second data sheet i use
data validation to allow people to choose anyone of these players eg
ab4= the list of players. When a player scores i want their number of
goals to appear in this second sheet eg in ac4, but obviously this
depends on which player has been chosen from the list in ab4. I have
tried using if statements within if statements but you can only have a
maximum of 7 'ifs' eg
=if(ab4="john",$j$4,if(ab4="dan",$j$5,if(ab4="ron" ,$j$6,0))). I have
tried using Vlookup by doing =VLOOKUP(AB4,i4:i35,2) where the goals
scored are my second column and when i choose the first person in the
list in ab4 the value that is returned in ac4 is 0 when it should be 1
since this is what i entered in j4, please help!!!


+-------------------------------------------------------------------+
|Filename: Copy of World Cup 2006.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4770 |
+-------------------------------------------------------------------+

--
Blade2304
------------------------------------------------------------------------
Blade2304's Profile: http://www.excelforum.com/member.php...o&userid=33492
View this thread: http://www.excelforum.com/showthread...hreadid=542610



Blade2304

Vlookup problem
 

Thanks, thats worked exactly how i wanted it to:)


--
Blade2304
------------------------------------------------------------------------
Blade2304's Profile: http://www.excelforum.com/member.php...o&userid=33492
View this thread: http://www.excelforum.com/showthread...hreadid=542610


Kevin Vaughn

Vlookup problem
 
You are welcome.
--
Kevin Vaughn


"Blade2304" wrote:


Thanks, thats worked exactly how i wanted it to:)


--
Blade2304
------------------------------------------------------------------------
Blade2304's Profile: http://www.excelforum.com/member.php...o&userid=33492
View this thread: http://www.excelforum.com/showthread...hreadid=542610




All times are GMT +1. The time now is 07:38 PM.

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