Query two values to return a value

TRobert

New Member
Joined
Jan 12, 2023
Messages
11
Office Version
  1. 2021
Platform
  1. Windows
I'm trying to query column A and column B with values from column E and column F and return the correct values from column C and column D into column G and column H.

Thx :)


Book1.xlsx
ABCDEFGH
1plangrademinmaxplan2grade2min1max2
2125100200135????
3135200300245
4145300400425
5155400500255
6245300400275
7255400500375
8265500600465
9275600700155
10355400500185
11365500600475
12375600700475
13385700800355
144756007002105
15485700800185
16495800900185
1741059001000495
Sheet3
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hey TRobert could you fill in G and H with the results you expect from the formula, I have guessed but my formulas result in 0 where plan and grade dont match numbers in plan2 and grade2
my assumption is this:
formula for min1: =SUMIFS($C$2:$C$17,$A$2:$A$17,$E2,$B$2:$B$17,$F2)
formula for min2: =SUMIFS($D$2:$D$17,$A$2:$A$17,$E2,$B$2:$B$17,$F2)

hope this helps
 
Upvote 0
I ended up using FILTER to solve my issue. =FILTER(named1, (Named2=cell1)*(Named2=cell2),"")

Thx for the input.
Love this site!!!
 
Upvote 0
Correction

=FILTER(named1, (Named2=cell1)*(Named3=cell2),"")
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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