Search code examples
excelif-statementnestednested-if

Nested if and IF (And statement on Excel


I have a spread sheet in which I want to display some data

Budget 9792.88 --this is b16

Actual cost 10075.75 --this is b17

I want to create a formula in which if our actual cost is 15% over the budget or larger is displays over budgeted. If it is 15% under budget or larger it displays under budget. And if it is in between those two it displays you stayed within your budget.

I have a working formula but I am getting a value error.

=IF(B17<=(B16*1.15),"Met our 15% goal",IF(B17>=(B16/1.15),"Over the budget")),IF(AND(B17<=(B16*1.15),B17>=(B16/1.15)),"Met your goal")

Solution

  • Excel actually reads the if function from the left like we read a book from left, so there is no need to give in between explanation to if function. Once you assign a value to a position, it will not change by its consecutive value.

    =IF(A2<A1*0.85,"Under Budget",IF(A2<A1*1.15,"between budget","above budget"))