Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default vlookup for 2 criterias

Good morning,

I'm trying to use VLookup to populate the second table below using the data
from table 1, but there are two lookup matches that need to occur (Segment &
ReportType) and I am unable to make it work.

TABLE 1 : a1:c9
Segment/ReportType/Hours
AAA/Break/4620
AAA/EmpEng/690
BBB/Break/2435
BBB/Coach/16285
CCC/Coach/50744
CCC/ Empeng/2940

TABLE 2 : e1:I5
Segment/BREAK/COACH/EMPENG
ASC
BBB
BCB
CCC

This is the formula I'm using for one criteria and have tried to alter for
two criterias but without any succes..
=IF(ISERROR(VLOOKUP(K$360,wksheetHRS,2,FALSE)),"0" ,VLOOKUP(K$360,wksheetHRS,2,FALSE))

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default vlookup for 2 criterias

In table 1 insert a new column C and put this formula in C2:

=A2&B2

with a suitable heading in C1. Copy this down to C9.

Then your formula in G2 becomes:

=IF(ISNA(VLOOKUP($F2&G$1,$C$2:$D$9,2,0)),"",VLOOKU P($F2&G$1,$C$2:$D
$9,2,0))

Copy this across to I2, and then copy G2:I2 down to row 5.

Hope this helps.

Pete



On Apr 10, 4:19*pm, Dode wrote:
Good morning,

I'm trying to use VLookup to populate the second table below using the data
from table 1, but there are two lookup matches that need to occur (Segment &
ReportType) and I am unable to make it work. *

TABLE 1 : * a1:c9
Segment/ReportType/Hours
AAA/Break/4620
AAA/EmpEng/690
BBB/Break/2435
BBB/Coach/16285
CCC/Coach/50744
CCC/ Empeng/2940

TABLE 2 : e1:I5
Segment/BREAK/COACH/EMPENG
ASC
BBB
BCB
CCC

This is the formula I'm using for one criteria and have tried to alter for
two criterias but without any succes..
=IF(ISERROR(VLOOKUP(K$360,wksheetHRS,2,FALSE)),"0" ,VLOOKUP(K$360,wksheetHRS*,2,FALSE))

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default vlookup for 2 criterias

Thanks for taking the time to respond. Due to the set up of the report I
could not concantenate the columns, however, I was able to resolve with this
formula :
=INDEX(Worksheet!$M$250:$M$351,MATCH(1,($B361=Work sheet!$K$250:$K$351)*(D$359=Worksheet!$L$250:$L$35 1),0))

thanks!

"Pete_UK" wrote:

In table 1 insert a new column C and put this formula in C2:

=A2&B2

with a suitable heading in C1. Copy this down to C9.

Then your formula in G2 becomes:

=IF(ISNA(VLOOKUP($F2&G$1,$C$2:$D$9,2,0)),"",VLOOKU P($F2&G$1,$C$2:$D
$9,2,0))

Copy this across to I2, and then copy G2:I2 down to row 5.

Hope this helps.

Pete



On Apr 10, 4:19 pm, Dode wrote:
Good morning,

I'm trying to use VLookup to populate the second table below using the data
from table 1, but there are two lookup matches that need to occur (Segment &
ReportType) and I am unable to make it work.

TABLE 1 : a1:c9
Segment/ReportType/Hours
AAA/Break/4620
AAA/EmpEng/690
BBB/Break/2435
BBB/Coach/16285
CCC/Coach/50744
CCC/ Empeng/2940

TABLE 2 : e1:I5
Segment/BREAK/COACH/EMPENG
ASC
BBB
BCB
CCC

This is the formula I'm using for one criteria and have tried to alter for
two criterias but without any succes..
=IF(ISERROR(VLOOKUP(K$360,wksheetHRS,2,FALSE)),"0" ,VLOOKUP(K$360,wksheetHRSÂ*,2,FALSE))

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default vlookup for 2 criterias

Okay, well I'm glad that you got something that worked for you. Thanks for
feeding back.

Pete

"Dode" wrote in message
...
Thanks for taking the time to respond. Due to the set up of the report I
could not concantenate the columns, however, I was able to resolve with
this
formula :
=INDEX(Worksheet!$M$250:$M$351,MATCH(1,($B361=Work sheet!$K$250:$K$351)*(D$359=Worksheet!$L$250:$L$35 1),0))

thanks!

"Pete_UK" wrote:

In table 1 insert a new column C and put this formula in C2:

=A2&B2

with a suitable heading in C1. Copy this down to C9.

Then your formula in G2 becomes:

=IF(ISNA(VLOOKUP($F2&G$1,$C$2:$D$9,2,0)),"",VLOOKU P($F2&G$1,$C$2:$D
$9,2,0))

Copy this across to I2, and then copy G2:I2 down to row 5.

Hope this helps.

Pete



On Apr 10, 4:19 pm, Dode wrote:
Good morning,

I'm trying to use VLookup to populate the second table below using the
data
from table 1, but there are two lookup matches that need to occur
(Segment &
ReportType) and I am unable to make it work.

TABLE 1 : a1:c9
Segment/ReportType/Hours
AAA/Break/4620
AAA/EmpEng/690
BBB/Break/2435
BBB/Coach/16285
CCC/Coach/50744
CCC/ Empeng/2940

TABLE 2 : e1:I5
Segment/BREAK/COACH/EMPENG
ASC
BBB
BCB
CCC

This is the formula I'm using for one criteria and have tried to alter
for
two criterias but without any succes..
=IF(ISERROR(VLOOKUP(K$360,wksheetHRS,2,FALSE)),"0" ,VLOOKUP(K$360,wksheetHRS*,2,FALSE))

Thanks





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP WITH 2 CRITERIAS... TRYIN Excel Worksheet Functions 1 January 30th 08 08:07 PM
Too many criterias... [email protected] Excel Worksheet Functions 12 June 14th 07 02:42 PM
If Criterias Ricardo Excel Discussion (Misc queries) 3 April 5th 07 01:06 PM
Sum If using 2 criterias Michael Excel Discussion (Misc queries) 10 January 4th 07 11:00 PM
VLOOKUP with 2 Criterias Roni Excel Worksheet Functions 22 April 26th 05 08:37 PM


All times are GMT +1. The time now is 07:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"