question

gajender612

New Member
Joined
Jul 31, 2015
Messages
12
I want to know if there are two coloumn a and b, In a we have name and b we have salary, Suppose there is a name sandeep thrice in column A and In Column B sandeep has three different salary. So How can we find out which sandeep had maximum or minimum Salary.

Thanks
Gajender
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Excel 2010
ABCDE
1sandeep thrice35884Namesandeep thrice
2Minimum12462
3Maximum35884
4
5
6
7sandeep thrice13971
8
9
10sandeep thrice12462
Sheet1
Cell Formulas
RangeFormula
E2{=MIN(IF(A1:A10=E1,B1:B10))}
E3{=MAX(IF(A1:A10=E1,B1:B10))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
I want to know if there are two coloumn a and b, In a we have name and b we have salary, Suppose there is a name sandeep thrice in column A and In Column B sandeep has three different salary. So How can we find out which sandeep had maximum or minimum Salary.

Thanks
Gajender

Are you allowed to use helper cells?

If so, I can suggest you to create a cell in which, through data validation you get your employee name. Then, create a cell under which you will put the "Highest Salary" and one in which you will put the "Minimum Salary".

Then, you can work as follows, supposing your "employee name" is sitting in E2 :

For the Max Salary : =MAX(IF(A:A=E2,B:B))
For the Min Salary : =MIN(IF(A:A=E2,B:B))

Both of these are "Array formulas" and require to be entered through the keyboard shortcut CTRL+SHIFT+ENTER
As you didn't specify the size of your dataset, the formula will look through the whole column A and the whole column B, this can be adjusted if needed.

Afterwards, you can work with conditional formatting to highlight the cells which have the employee name and the minimum salary in red (or whichever colour you prefer) and the maximum salary in green.

Supposing you have put the formula for the Max Salary in F2 you can use this rule to do the highlight : =AND($B1=$F$2,$A1=$E$2) and this one for the Min Salary - supposing you put the formula for the Min Salary in G2 : =AND($A1=$E$2,$B1=$G$2). Apply the formatting to either the whole columns or just your range.

I would post the sample sheet with the embedded formulas in html but I'm at work and don't have the HMTL add-in installed.

Hope this helps you.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,317
Members
449,218
Latest member
Excel Master

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