VLOOKUP with conditions

Santaflare

New Member
Joined
Jan 4, 2017
Messages
15
Hi,

-I'm tryingto create a spreadsheet which enables me to filter a list of salariesso that I can display the maximum wage for employees after an annual increase.I’ve tried using the VLOOKUP, but unfortunately I can’t get it to work asintended.


I’ve used the function in the example below. Column A contains currentsalary while column E shows which employees that has gotten an increase thisyear (columns B-D are used for salary history). What I’m trying to accomplishis to display the highest level of income for those employees that has got a raise.


In the attached example I want to display the data in cell A3: 2000, butit only generates a 0 unless all cells in column E are filled.

=VLOOKUP(MAX(A1:A8), A1:E8, 5, FALSE)

Any ideas for a workaround?


A
B
C
D
E
1
1000200
2
800100
3
2000300
4
2500
5
150050
6
1200
7
1800
83000

<tbody>
</tbody>
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
This depends on your excel version but may work:

=MAXIFS(A1:A8,E1:E8,"<>")
 
Upvote 0
-I'm using Excel 2016, and that function doesn’t seem to exist in this edition..
= /
 
Last edited:
Upvote 0
Sure its fairly new. Heres another option which assumes you dont have max values that are negative:

=MAX(INDEX((E1:E8<>"")*A1:A8,0))
 
Upvote 0
Sure its fairly new. Heres another option which assumes you dont have max values that are negative:

=MAX(INDEX((E1:E8<>"")*A1:A8,0))

Thanks,

Works like a charm!
= )

I tried to change the MAX to MIN in order to get the lowest number aswell, but that doesn’t seem to work. Any thoughts as to why?
(Unfortunately I need to extract both Highest, Lowest, Median and Averagefor the same range.)
 
Upvote 0
Min is going to produce 0 if used like that. You will have to use array formula:

=MIN(IF(E1:E8<>"",A1:A8))

It has to be entered CTRL-SHIFT-ENTER or you will get 0 again.
 
Upvote 0
Try these..

Max: =INDEX(A1:A8,MATCH(MAX(E1:E8),E1:E8,0),1)
Min: =INDEX(A1:A8,MATCH(MIN(E1:E8),E1:E8,0),1)
 
Upvote 0
Try these..

Max: =INDEX(A1:A8,MATCH(MAX(E1:E8),E1:E8,0),1)
Min: =INDEX(A1:A8,MATCH(MIN(E1:E8),E1:E8,0),1)

They will produce the corresponding value in A for the minimum/maximum value of E which is not what is required.
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,853
Members
449,194
Latest member
HellScout

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