Forum Discussion

acoffee21's avatar
acoffee21
Copper Contributor
Apr 09, 2020
Solved

Spill Error with IF function

I am working on a school excel project and I keep getting the spill error.  I have included a screenshot of my excel spreadsheet.  Would anyone be able to help me with this?  

My book is telling me to type =if ( d9="Warranty",0,[Time Billed] * 75)

  • acoffee21 

    Obviously, you are learning about structured table references. Then this is the formula you need.

    =IF([@[Service Type]]="Warranty",0,[@[Time Billed]]*75)

    May be a bit confusing in the beginning with the "@"-signs and the square brackets, but if you build the formula by pointing at the cell within the table, it will automatically become like that. The "@"-sign tills it to only look at the cell on the current row. Of course, you can leave the "D9" reference in place, but then you might as well use "E9" for the time billed part of the formula.

     

3 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    acoffee21 

    Obviously, you are learning about structured table references. Then this is the formula you need.

    =IF([@[Service Type]]="Warranty",0,[@[Time Billed]]*75)

    May be a bit confusing in the beginning with the "@"-signs and the square brackets, but if you build the formula by pointing at the cell within the table, it will automatically become like that. The "@"-sign tills it to only look at the cell on the current row. Of course, you can leave the "D9" reference in place, but then you might as well use "E9" for the time billed part of the formula.

     

    • JGTbo98's avatar
      JGTbo98
      Copper Contributor
      Thank you beyond words! 10/2021.
  • gyankosh's avatar
    gyankosh
    Brass Contributor

    acoffee21  Tried it but no error. Could yo please share the file.? Formula is correct.

     

    For the reference you can also refer here.

    https://gyankosh.net/msexcel/functions/logical/excel-function-if/

     

Resources