ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional VLOOKUP? (https://www.excelbanter.com/excel-programming/344263-conditional-vlookup.html)

uberathlete[_5_]

Conditional VLOOKUP?
 

Hi all! I've got two sheets, sheet 1 and 2 (attached). Basically, I nee
the Number column in Sheet 2 to be filled up with Sheet 1 as th
reference for the needed data. The problem is that some entries i
Sheet 1 have the same ID but are from different Groups. For example
AAA Inc. has an ID of AAA but can be in either LMFI_AAA or LMFII_AAA
So, I basically need some sort of VLOOKUP that recognizes the Group o
something like that. Any help would be greatly appreciated.

http://www.excelforum.com/attachment...tid=3976&stc=1
http://www.excelforum.com/attachment...ntid=3977&stc=

+-------------------------------------------------------------------
|Filename: sheet2.JPG
|Download: http://www.excelforum.com/attachment.php?postid=3977
+-------------------------------------------------------------------

--
uberathlet
-----------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...fo&userid=2838
View this thread: http://www.excelforum.com/showthread.php?threadid=48057


swatsp0p[_38_]

Conditional VLOOKUP?
 

Use concatenation to create your lookup value. In your example, on
sheet 2, A1 contains the 'I' group name, so:

=VLOOKUP($A$1&"_"&A4,Sheet35!$A$2:$D$7,4,0) returns 4444 in C4

copy this down your range of group I entries.

similarly, A9 contains the group "II" name, so:

=VLOOKUP($A$9&"_"&A12,Sheet35!$A$2:$D$7,4,0) returns 55555 in C12

Does this work for you?


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=480574


uberathlete[_6_]

Conditional VLOOKUP?
 

^^ Thanks! I'll go try it out.


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=480574


David

Conditional VLOOKUP?
 
Seems you have stated your own answer, you need to look up the Group, since
it is the unique field. What is the problem in doing this?
--
David


"uberathlete" wrote:


Hi all! I've got two sheets, sheet 1 and 2 (attached). Basically, I need
the Number column in Sheet 2 to be filled up with Sheet 1 as the
reference for the needed data. The problem is that some entries in
Sheet 1 have the same ID but are from different Groups. For example,
AAA Inc. has an ID of AAA but can be in either LMFI_AAA or LMFII_AAA.
So, I basically need some sort of VLOOKUP that recognizes the Group or
something like that. Any help would be greatly appreciated.

http://www.excelforum.com/attachment...tid=3976&stc=1
http://www.excelforum.com/attachment...tid=3977&stc=1


+-------------------------------------------------------------------+
|Filename: sheet2.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=3977 |
+-------------------------------------------------------------------+

--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=480574




All times are GMT +1. The time now is 12:24 AM.

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