IF statements
Website: https://support.microsoft.com/en-us/office/if-function-69aed7c9-4e8a-4755-a9bc-aa8bbff73be2
As a Project Analyst, I used IF statements to check how much credits were generated for a single employee in 2020. The if statements are used to check several things and can produce a result if the condition turns out true or false. When I joined the team, there was already a template that utilized embedded IF statements paired with other functions like vlookup because there were several tabs within one excel file.
Below, I decided to play around with several IF statements and concluded with a SUMIF to calculate the credit generated for a single employee in 2020.
The main idea with my formulas is to find at what quarter does the employee's gross pay goes over 10k. In this case for employee John, it was Q3. Therefore, I calculated 50% of his Q1 and Q2 gross pay to be credit generated. In Q3, he went over. Since I know 5,000 is the maximum generated credit for 2020, then I can deduct that from Q1 and Q2 generated credits to get the remaining. Finally, I used a sumif to only sum up the credits that I deemed "okay," meaning that those credits are generated within the 10k max qualified gross pay rule for 2020.
I have tested this with other numbers, so my formulas do work. I know there are ways to make a cleaner because unless you look at each formulas individually, it looks confusing at first glance!
Nevertheless, I am happy with what I produced below because typically I use someone's else template and here I created my own using if statements. Feel free to see below the logic behind each IF formula.
Comments
Post a Comment