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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Ok, I have another question I need to pull out of this set. Same data set, I need to pull if they worked at a Different location, different from their Home Location.

Research (Sheet Name)
BCDJ
Employee IDNameHome LocationWorked Location
238324Smith, John002
502199Toms, Alex125
445882Walters, Jean223

ORIG (Sheet Name)
CDJU
EMPLOYEE IDNameHome LocationWorked Location
238324Smith, John002002
238324Smith, John002002
238324Smith, John002005
502199Toms, Alex125125
502199Toms, Alex125130
502199Toms, Alex125125
445882Walters, Jean223223
445882Walters, Jean223223
 
Upvote 0
How about this Conditional Formatting rule for U2:Uwhatever: =U2<>J2 and set it to bold and red font?

Probably use: =VLOOKUP(D2,Research!$C$1:$D$4,2,FALSE) for J2 (fill down).
 
Upvote 0
I could do that but similar to the formula you both helped me with before; I need to pull that "Other worked location" to the Research sheet.

These lists are very large and I need to automate pulling in the data. I tried to use a formula similar but can't get it to work right.
 
Upvote 0
What do you want to show on the Research sheet for those people? If they ever worked on a different-than-home, show that one?

How's this in J2 (fill down) on Research and format custom to be 000;;;
=SUMPRODUCT((B2=Orig!$C$2:$C$9)*(Orig!$U$2:$U$9<>D2)*(Orig!$U$2:$U$9))

But, could a person work on more than 1 non-home location? If so, then what?
 
Last edited:
Upvote 0
Yes, they can work at more than 1 Non-Home Location. (I just ran into that problem). If so then we have to look at Column O "Earned Hours" to use the location with the Most Hours.

For Example I would want to pull the Location 229 because it had the most hours.
Earned HoursWorked Location
5.23225
9.05229
7.84226
 
Upvote 0
As an example say one Employee, so below those in Red are the Highest Hours and Different than the Home Location.

ORIG (Sheet Name)
CDJOU
EMPLOYEE IDNameHome LocationEarned HoursWorked Location
238324Smith, John0029.34002
238324Smith, John0028.64003
238324Smith, John00215.69005
502199Toms, Alex1255.75135
502199Toms, Alex1259.34130
502199Toms, Alex1255.50125
445882Walters, Jean223223
445882Walters, Jean223223
 
Upvote 0
GRIN...
So, for Smith, you want 005 and for Toms, you want 130?!

What happens when someone works non-home and the same number of hours at each of the non-home locations?
Did you think of that one?
 
Upvote 0
I created a helper column W on the Orig sheet and filled down W2:
Code:
=IF(MAXIFS(Orig!$O$2:$O$9,Orig!$C$2:$C$9,C2,Orig!$U$2:$U$9,"<>"&Research!D2)=O2,Orig!U2,0)

Then, on the Research sheet, filled down this ARRAY FORMULA (CTRL+Shift+Enter):
Code:
=SUM((B2=Orig!$C$2:$C$9)*(Orig!$U$2:$U$9<>D2)*(Orig!$W$2:$W$9))
and set the custom format to 000;;;

I'm sure there is a much simpler way, maybe using AGGREGATE or something else, but don't have time to clean this up right now.

If you can put in a helper column per the above, and have to place it elsewhere than W, adjust the formula on the Research sheet accordingly.
 
Upvote 0

Forum statistics

Threads
1,224,821
Messages
6,181,163
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