Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Deeds
 
Posts: n/a
Default Vlookup "crosstab"

Here it is:
car bus eat walk
box cat rug talk
apple pear fruit 5 10 15 20
apple corn fruit 7 3 2 4

I need to on another page do the following:
If D1=car and D2=box AND A4=apple and B4=pear and C4=fruit, bring back "5"
Can anyone help? Thanks

  #2   Report Post  
Domenic
 
Posts: n/a
Default

Assuming that Sheet2 contains your source data, try...

=SUMPRODUCT((Sheet2!$D$3:$G$4)*(Sheet2!$D$1:$G$1=D $1)*(Sheet2!$D$2:$G$2=D
$2)*(Sheet2!$A$3:$A$4=$A4)*(Sheet2!$B$3:$B$4=$B4)* (Sheet2!$C$3:$C$4=$C4))

Hope this helps!

In article ,
"Deeds" wrote:

Here it is:
car bus eat walk
box cat rug talk
apple pear fruit 5 10 15 20
apple corn fruit 7 3 2 4

I need to on another page do the following:
If D1=car and D2=box AND A4=apple and B4=pear and C4=fruit, bring back "5"
Can anyone help? Thanks

  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=INDEX(D4:G5,MATCH(1,(A4:A5="apple")*(B4:B5="pear" )*(C4:C5="fruit"),0),MATCH(1,(D1:G1="car")*(D2:G2= "box"),0))

OR, use cell references to hold the criteria:

J1 = apple
J2 = pear
J3 = fruit

K1 = car
K2 = box

=INDEX(D4:G5,MATCH(1,(A4:A5=J1)*(B4:B5=J2)*(C4:C5= J3),0),MATCH(1,(D1:G1=K1)*(D2:G2=K2),0))

Biff

"Deeds" wrote in message
...
Here it is:
car bus eat walk
box cat rug talk
apple pear fruit 5 10 15 20
apple corn fruit 7 3 2 4

I need to on another page do the following:
If D1=car and D2=box AND A4=apple and B4=pear and C4=fruit, bring back
"5"
Can anyone help? Thanks



  #4   Report Post  
Deeds
 
Posts: n/a
Default

Thanks....however I did exactly as you have it and did the ctrl shift enter
and I get the message box: Array formulas are not valid in merged cells.
Can you help with this?

"Biff" wrote:

Hi!

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=INDEX(D4:G5,MATCH(1,(A4:A5="apple")*(B4:B5="pear" )*(C4:C5="fruit"),0),MATCH(1,(D1:G1="car")*(D2:G2= "box"),0))

OR, use cell references to hold the criteria:

J1 = apple
J2 = pear
J3 = fruit

K1 = car
K2 = box

=INDEX(D4:G5,MATCH(1,(A4:A5=J1)*(B4:B5=J2)*(C4:C5= J3),0),MATCH(1,(D1:G1=K1)*(D2:G2=K2),0))

Biff

"Deeds" wrote in message
...
Here it is:
car bus eat walk
box cat rug talk
apple pear fruit 5 10 15 20
apple corn fruit 7 3 2 4

I need to on another page do the following:
If D1=car and D2=box AND A4=apple and B4=pear and C4=fruit, bring back
"5"
Can anyone help? Thanks




  #5   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Merged cells are a cancer in spreadsheets!

Unmerge the cells!

You can get the same "effect" without the problems:

FormatCellsAlignmentHorizontalCenter across selection.

What cells are merged?

Biff

"Deeds" wrote in message
...
Thanks....however I did exactly as you have it and did the ctrl shift
enter
and I get the message box: Array formulas are not valid in merged cells.
Can you help with this?

"Biff" wrote:

Hi!

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=INDEX(D4:G5,MATCH(1,(A4:A5="apple")*(B4:B5="pear" )*(C4:C5="fruit"),0),MATCH(1,(D1:G1="car")*(D2:G2= "box"),0))

OR, use cell references to hold the criteria:

J1 = apple
J2 = pear
J3 = fruit

K1 = car
K2 = box

=INDEX(D4:G5,MATCH(1,(A4:A5=J1)*(B4:B5=J2)*(C4:C5= J3),0),MATCH(1,(D1:G1=K1)*(D2:G2=K2),0))

Biff

"Deeds" wrote in message
...
Here it is:
car bus eat walk
box cat rug talk
apple pear fruit 5 10 15 20
apple corn fruit 7 3 2 4

I need to on another page do the following:
If D1=car and D2=box AND A4=apple and B4=pear and C4=fruit, bring back
"5"
Can anyone help? Thanks








  #6   Report Post  
Deeds
 
Posts: n/a
Default

I removed any merged cells....it works great....thanks a bunch!

"Biff" wrote:

Hi!

Merged cells are a cancer in spreadsheets!

Unmerge the cells!

You can get the same "effect" without the problems:

FormatCellsAlignmentHorizontalCenter across selection.

What cells are merged?

Biff

"Deeds" wrote in message
...
Thanks....however I did exactly as you have it and did the ctrl shift
enter
and I get the message box: Array formulas are not valid in merged cells.
Can you help with this?

"Biff" wrote:

Hi!

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=INDEX(D4:G5,MATCH(1,(A4:A5="apple")*(B4:B5="pear" )*(C4:C5="fruit"),0),MATCH(1,(D1:G1="car")*(D2:G2= "box"),0))

OR, use cell references to hold the criteria:

J1 = apple
J2 = pear
J3 = fruit

K1 = car
K2 = box

=INDEX(D4:G5,MATCH(1,(A4:A5=J1)*(B4:B5=J2)*(C4:C5= J3),0),MATCH(1,(D1:G1=K1)*(D2:G2=K2),0))

Biff

"Deeds" wrote in message
...
Here it is:
car bus eat walk
box cat rug talk
apple pear fruit 5 10 15 20
apple corn fruit 7 3 2 4

I need to on another page do the following:
If D1=car and D2=box AND A4=apple and B4=pear and C4=fruit, bring back
"5"
Can anyone help? 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
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 12:44 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"