Vlookup Max Value

hscott82

New Member
Joined
Oct 30, 2019
Messages
33
Hello, I am trying to look up the Max Value (Paid Rate) from one sheet and return it to another sheet.

I have employees that are paid at a Base Rate, but sometimes are paid at a different rate. On 'Orig' Tab there can be a lot of Rows for employees and I need to find the MAX Paid Rate in Column P. It would be Higher than their Base Rate.

Sheet 1 (Research Tab)
BCIK
Employee IDNameBasePaid rate
0238324Smith, John$ 20.00
0502199Toms, Alex$ 9.75
0445882Walters, Jean$15.00

Sheet 2 (Orig Tab) The Paid Rates in RED are the Values I am looking at Returning to the Research Tab, because they are different than the Base Rate in column H.
CDHNP
EMPLOYEE IDNameBase RateCodePaid Rate
0238324Smith, John
20​
REG2
20​
0238324Smith, John
20​
REG2
25
0238324Smith, John
20​
REG2
20​
0502199Toms, Alex
9.75​
REG2
9.75​
0502199Toms, Alex
9.75​
REG2
10.5
0502199Toms, Alex
9.75​
REG2
9.75​
0445882Walters, Jean
15​
REG2
15​
0445882Walters, Jean
15​
REG2
15​
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
If you have 365 or 2019:
Code:
=MAXIFS(Orig!$P$2:$P$9,Orig!$C$2:$C$9,B2)

Otherwise, this ARRAY FORMULA:
Code:
=MAX(IF(Orig!$C$2:$C$9=B2,Orig!$P$2:$P$9))
 
Upvote 0
Try this

varios 12feb2020.xlsm
ABCDE
1Employee IDNameBasePaid rate
2238324Smith, John2025
3502199Toms, Alex9.7510.5
4445882Walters, Jean15Is no different
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=IF(SUMPRODUCT(MAX((Sheet2!C2:C9=B2)*(Sheet2!P2:P9)))>D2,SUMPRODUCT(MAX((Sheet2!C2:C9=B2)*(Sheet2!P2:P9))),"Is no different")
 
Upvote 0
Thank you, none of these are working for me.

@kweaver Yours return values on some, but not on all and not the Max (Higher Rate). All the other rows return -.
=MAXIFS(Orig!$P$2:$P$2000,Orig!$C$2:$C$2000,B5)



@DanteAmor Yours returns #N/A. I have corrected it to this for my sheet names and expanded the row #'s of P to 2000.
=IF(SUMPRODUCT(MAX((ORIG!C2:C2000=B5)*(ORIG!P2:P9)))>I5,SUMPRODUCT(MAX((ORIG!C2:C2000=B5)*(ORIG!P2:P2000))),"Is no different")
 
Upvote 0
IF(SUMPRODUCT(MAX((ORIG!C2:C2000=B5)*(ORIG!P2:P9)))>I5,SUMPRODUCT(MAX((ORIG!C2:C2000=B5)*(ORIG!P2:P2000))),"Is no different")
Failed to change that data, it should be like this:


varios 12feb2020.xlsm
BCIJ
4Employee IDNameBasePaid rate
5238324Smith, John2025
6502199Toms, Alex9.7510.5
7445882Walters, Jean15Is no different
Sheet1
Cell Formulas
RangeFormula
J5:J7J5=IF(SUMPRODUCT(MAX((Orig!C2:C2000=B5)*(Orig!P2:P2000)))>I5,SUMPRODUCT(MAX((Orig!C2:C2000=B5)*(Orig!P2:P2000))),"Is no different")
 
Upvote 0
Seems to work for my Research sheet:

XLOOKUP_info.xlsm
BCDEFGHIJK
1Employee IDNameBasePaid rate
2238324Smith, John2025
3502199Toms, Alex9.7510.5
4445882Walters, Jean1515
Research
Cell Formulas
RangeFormula
K2:K4K2=MAXIFS(Orig!$P$2:$P$9,Orig!$C$2:$C$9,B2)
 
Upvote 0
Dante That worked better, however, there can be multiple rows for the same employees as in my first example. Your code is just returning "Is no different" I feel like it is just looking at the first Rate in the column.
 
Upvote 0
These are the data on sheet1, in what way are you not reviewing all employees?
You could provide your example.

varios 12feb2020.xlsm
CDHNOP
1EMPLOYEE IDNameBase RateCodePaid Rate
2238324Smith, John20?REG220
3238324Smith, John20?REG225
4238324Smith, John20?REG220
5502199Toms, Alex9.75?REG29.75
6502199Toms, Alex9.75?REG210.5
7502199Toms, Alex9.75?REG29.75
8445882Walters, Jean15?REG215
9445882Walters, Jean15?REG215
Orig
 
Upvote 0
Oh my goodness! I am so sorry, I just realized how MASSIVE this spreadsheet is. Both your formulas work! I just needed to expand P out to 25k rows!!!! WOW!!! I didn't even realize!!!! I am sorry but thank you both SO MUCH!!!!! This is amazing!!!
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,143
Members
453,021
Latest member
Justyna P

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