Related:
- Nested if
- How many nested if statements in excel - Guide
1 response
Hi Tosh,
If I understand you correctly your sheets look a bit like this:
SHEET1
SHEET2
Now you would like to know how many employees at a certain location have a higher salary then their supervisor at the same location.
Example: Location TX has 3 employees (B, E, F) of which 2 of them (E, F) have a higher salary then their supervisor (H).
Start by sorting SHEET1 by location:
SHEET1
Now use the following formula in a cell on sheet1 (or change the sheet refference in formula):
=SUM(IF(C5:C7>Sheet2!C3,1,0))
Confirm formula by hitting Ctrl+Shift+Enter and the result will be 2.
Best regards,
Trowa
If I understand you correctly your sheets look a bit like this:
SHEET1
Employee Location Salary A CA 10 B TX 12 C NY 11 D IL 13 E TX 20 F TX 25
SHEET2
Supervisor Location Salary G CA 15 H TX 15 I NY 10 J IL 12
Now you would like to know how many employees at a certain location have a higher salary then their supervisor at the same location.
Example: Location TX has 3 employees (B, E, F) of which 2 of them (E, F) have a higher salary then their supervisor (H).
Start by sorting SHEET1 by location:
SHEET1
Employee Location Salary A CA 10 D IL 13 C NY 11 B TX 12 E TX 20 F TX 25
Now use the following formula in a cell on sheet1 (or change the sheet refference in formula):
=SUM(IF(C5:C7>Sheet2!C3,1,0))
Confirm formula by hitting Ctrl+Shift+Enter and the result will be 2.
Best regards,
Trowa