Find min&max salary by using match and index

vamshivk

New Member
Joined
Mar 6, 2023
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
C_CodeFirstNameLastNameBirthdateGenderM_StatusDepartmentRegionBasic Salary
150834RamAmbradkar01-Jun-85FemaleMarriedFLMNorth
48000​
150784SachinBangera28-Aug-77FemaleSingleDigital MarketingNorth
35000​
150791RajeshBohra01-Dec-63FemaleMarriedDigital MarketingNorth
67000​
Figure out who has the Max and Min Salary
150940RajeeshC30-Aug-73MaleSingleInside SalesSouth
87000​
150777MelwynCrasto30-Oct-57MaleMarriedMarketingNorth
22000​
Name of Employees, who have
150805RajeshDedhia27-Aug-71MaleMarriedDirectorNorth
91000​
Max Salary
150990DattatrayDesai28-Aug-99MaleMarriedLearning & DevelopmentMid West
77000​
Min Salary
150989VishnuDesai28-Aug-90MaleMarriedDigital MarketingMid West
45000​
150881DineshDhanuka21-Jan-83MaleSingleDigital MarketingEast
92000​
150814HeenaDongre09-Nov-71MaleMarriedInside SalesNorth
50000​
150937DhirenHaria16-Aug-67MaleMarriedLearning & DevelopmentSouth
37000​
150888GururajJoshi01-Jan-80MaleMarriedLearning & DevelopmentEast
43000​
150865RuffinaJoshi20-Aug-85FemaleMarriedCEOEast
90000​
150858JagjitKahlon27-May-95MaleMarriedCCDEast
34000​
150930PiyushKamdar16-May-01MaleMarriedDigital MarketingSouth
82000​
150894DKulkarni21-Aug-01MaleMarriedInside SalesSouth
67000​
150947RajuManek30-Jul-91FemaleMarriedCCDSouth
85000​
150905YogeshMansharamani17-May-84FemaleSingleFLMSouth
62000​
150995SatishPasari22-Sep-96MaleMarriedInside SalesMid West
15000​
150912NitinPatki08-Jan-03FemaleMarriedOperationsSouth
81000​
150921PremPherwani15-Apr-04MaleMarriedFinanceSouth
19000​
150851SudeshPillai27-May-80MaleSingleInside SalesEast
75000​
150867BonecaRego22-Jun-79FemaleSingleFinanceEast
49000​
150899SharadchandraRiswadkar24-May-02MaleMarriedCCDSouth
50000​
150975SimonRodrigues07-Mar-86MaleMarriedFinanceMid West
83000​
150901AshokSamtaney14-Mar-90FemaleMarriedSalesSouth
53000​
150968PrafulSavla13-Nov-01MaleMarriedOperationsSouth
65000​
150773StanSerrao15-Jul-73MaleMarriedFinanceNorth
85000​
150840PiyushShah05-May-63FemaleMarriedInside SalesEast
20000​
150850DhirenSheth07-Sep-87MaleMarriedCCDEast
47000​
150962ShankarShetty01-Jun-03FemaleMarriedDirectorSouth
87000​
150954KawdoorShetty06-Mar-97FemaleMarriedSalesSouth
57000​
150874VenithaShetty26-Sep-03FemaleMarriedMarketingEast
27000​
150798TulsidasShetty31-May-77FemaleMarriedDigital MarketingNorth
81000​
150830RajeevSingh01-Jul-79FemaleMarriedSalesNorth
52000​
150929BobbyTanna16-Mar-73MaleMarriedMarketingSouth
58000​
150982JitendraThacker24-May-97MaleMarriedMarketingMid West
47000​
150821YashrajVaidya15-Jan-82MaleSingleCCDNorth
26000​
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Salaries can be obtained with MIN and MAX functions. Embedding these functions in the MATCH part of the NDEX/MATCH combination allows to retrieve the employee's name
 
Upvote 0
The problem with using match comes if more than one person has equal max or min salary.
Here is a method for your version that will return all names if equals exist.
Note that I have changed the sample data so that there is an equal max salary.

23 03 06.xlsm
BCIJKLMNO
1FirstNameLastNameBasic Salary
2RamAmbradkar48000Max Salary92000Dinesh DhanukaNitin Patki 
3SachinBangera35000Min Salary15000Satish Pasari  
4RajeshBohra67000
5RajeeshC87000
6MelwynCrasto22000
7RajeshDedhia91000
8DattatrayDesai77000
9VishnuDesai45000
10DineshDhanuka92000
11HeenaDongre50000
12DhirenHaria37000
13GururajJoshi43000
14RuffinaJoshi90000
15JagjitKahlon34000
16PiyushKamdar82000
17DKulkarni67000
18RajuManek85000
19YogeshMansharamani62000
20SatishPasari15000
21NitinPatki92000
22PremPherwani19000
23SudeshPillai75000
24BonecaRego49000
25SharadchandraRiswadkar50000
26SimonRodrigues83000
27AshokSamtaney53000
28PrafulSavla65000
29StanSerrao85000
30PiyushShah20000
31DhirenSheth47000
32ShankarShetty87000
33KawdoorShetty57000
34VenithaShetty27000
35TulsidasShetty81000
36RajeevSingh52000
37BobbyTanna58000
38JitendraThacker47000
39YashrajVaidya26000
Salaries
Cell Formulas
RangeFormula
L2L2=MAX(I2:I39)
M2:O3M2=IFERROR(INDEX($B:$B,AGGREGATE(15,6,ROW($B$2:$B$40)/($I$2:$I$40=$L2),COLUMNS($M:M)))&" "&INDEX($C:$C,AGGREGATE(15,6,ROW($B$2:$B$40)/($I$2:$I$40=$L2),COLUMNS($M:M))),"")
L3L3=MIN(I2:I39)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
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