Return Value Based on Criteria

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
951
Office Version
  1. 365
Hi,

I have the following tables in Sheet 1 and Sheet 2:
Sheet 1Sheet 2
MonthBranchNameRateBranchNameJanFeb
JanTexasStaff156%TexasStaff156%36%
JanVirginiaStaff245%VirginiaStaff245%85%
JanMaineStaff375%MaineStaff375%92%
FebTexasStaff136%
FebVirginiaStaff285%
FebMaineStaff392%

In Sheet 2, I am trying to summarize the Rate for each staff based on the data from Sheet 1. I tried combining a few xlookup as below but was not successful.

Excel Formula:
=XLOOKUP(G3,C3:C8,XLOOKUP(H3,D3:D8,XLOOKUP(I2,B3:B8,E3:E8)))

Appreciate all the help.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try this:
Book1
ABCDEFGHI
1MonthBranchNameRateBranchNameJanFeb
2JanTexasStaff156%TexasStaff156%36%
3JanVirginiaStaff245%VirginiaStaff245%85%
4JanMaineStaff375%MaineStaff375%92%
5FebTexasStaff136%
6FebVirginiaStaff285%
7FebMaineStaff392%
Sheet6
Cell Formulas
RangeFormula
H2:I4H2=SUMIFS(D2:D7,B2:B7,F2:F4,C2:C7,G2:G4,A2:A7,H1:I1)
Dynamic array formulas.
 
Upvote 0
Sheet 2 B2:
Excel Formula:
=IFERROR(INDEX('Sheet 1'!$C$2:$C$7, MATCH(0, INDEX(COUNTIF($B$1:B1, 'Sheet 1'!$C$2:$C$7), 0, 0), 0)), "")
Sheet 2 A2:
Excel Formula:
=IFERROR(INDEX('Sheet 1'!$B$2:$B$7, MATCH($B2,'Sheet 1'!$C$2:$C$7,0)), "")
Sheet 2 C2:
Excel Formula:
=INDEX('Sheet 1'!$D$2:$D$7, MATCH(TRUE,('Sheet 1'!$C$2:$C$7=$B2)*('Sheet 1'!$A$2:$A$7=C$1),0))
Sheet 2 D2:
Excel Formula:
=INDEX('Sheet 1'!$D$2:$D$7, MATCH(TRUE,('Sheet 1'!$C$2:$C$7=$B2)*('Sheet 1'!$A$2:$A$7=D$1),0))
 
Upvote 0
Solution
Hi jdellasala and Flashbond,

Thank you for your solution and appreciate it. Have a great day ahead. 🙏
 
Upvote 0

Forum statistics

Threads
1,223,659
Messages
6,173,636
Members
452,525
Latest member
DPOLKADOT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top