Excel Noob Stuck On a Problem

darrow34

New Member
Joined
Mar 16, 2025
Messages
2
Office Version
  1. 365
Hello everyone! So I'm really new to Excel formulas so I'm sure I'm doing everything the hardest possible way. Below is my mini sheet and here's what I'm trying to do:

In Column O "Salary Actual" I'm attempting to populate salaries by the number of years in Column I. I've used IF functions to set a scale that returns the salary in Column J if the year is 9 or less, Column K if the year is between 10 and 19, and Column L if the year is 20 or more. What I haven't been able to figure out is how to get the MA (masters) in Column M to properly reflect in my formula. I'm sure there's a better way to do it but in the meantime I have set up Column N to reflect "Y" for yes if the person has a masters (MA) but I can't figure out how to make it translate into my "Salary Actual" column. I think it will show in my mini sheet that the IF formula is returning results in Column O correctly up until I have a "Y" in Column N. So, essentially, I need to find a way to calculate the MA column into my Salary Actual column when there is a Y in column N. Any help anyone can provide would be most appreciated. This is a real world scenario and I really need these numbers to add up correctly. I also need it to be dynamic because I will be adding more "Y"'s in column N here in the next week.

Thank you for your time and attention in this matter.






Cell Formulas
RangeFormula
I2:I12I2=DATEDIF(C2,TODAY(),"y")
J2:J12J2=VLOOKUP($I2,'24_25 Salary'!$A$2:$E$42,2)
K2:K12K2=VLOOKUP($I2,'24_25 Salary'!$A$2:$E$42,3)
L2:L12L2=VLOOKUP($I2,'24_25 Salary'!$A$2:$E$42,4)
M2:M12M2=VLOOKUP($I2,'24_25 Salary'!$A$2:$E$42,5)
O2:O12O2=IF([@[Years ]]<=9,[@BA],IF([@[Years ]]<=19,[@[BA+10]],IF([@[Years ]]>=20,[@[BA+20]],IF(AND([@[Years ]]>=0,SEARCH("Y",[@Masters])),[@MA]))))
 
With the if statements, it stops once there is a true, so you need to check Masters first if that's the most important check. Try this formula (Adjust it for the names in your table).
Excel Formula:
=IF(F2="Y",E2,IF(A2<10,B2,IF(A2<20,C2,D2)))
 
Upvote 0
Please try:

=IF([@Masters]="Y",[@MA],IF([@Years]<10,[@BA],IF([@Years]<20,[@[BA+10]],[@[BA+20]])))
 
Upvote 0
Solution
Hi dermie_72,

It looks like you beat me to the punch. How do you put the excel formula in a box like you did if you don't mind me asking? I am new here. Thanks. :)
 
Upvote 0
just above where you enter your text click on the one that has fx XLS this will put the code that enables the formatting.
Excel Formula:
=Add your formula here

Otherwise you can manually add the code like the attached.
1742178630617.png
 
Upvote 0
Thanks for your help folks. The solution you provided worked! My colleagues and I thank you.
 
Upvote 0

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