Forum Discussion

Kerry_J's avatar
Kerry_J
Copper Contributor
Apr 09, 2022
Solved

IFS syntax Question #NAME? error

I created a spreadsheet to collect times & material cost for the sake of updating our pricing in our paint department. I wanted the operators to select the paint of choice from a drop down menu, and by virtue of that selection, a cost per ounce would populate another field.  Here's the formula that I wrote:

=IFS(R5=Primer Yellow,AI5,R5=Primer Green,AI6,R5=Primer Grey,AI7,R5=Primer Black,AI8,R5=Topcoat White,AI9,R5=Topcoat Grey,AI10).  I get the #NAME? error.  What is wrong with my formula?

16 Replies

  • Kerry_J 

    As SergeiBaklan pointed out, the name strings have to be in quotes.  An alternative strategy often used in similar situations is to exploit the validation list to look up data from a corresponding list of data (cost in this case).

    = XLOOKUP(selectedPaint,PaintColors,Cost)

     

    • Kerry_J's avatar
      Kerry_J
      Copper Contributor
      Interesting Peter
      I like that idea. I'm new to some of these formulas but I should be able to figure that out somehow. the current table I created for my spreadsheet looks like this which I think is a great candidate for your suggestion:
      Paint Types Costs p/Oz.
      Primer Yellow $1.07
      Primer Green $1.05
      Primer Grey $1.22
      Primer Black $1.15
      Topcoat White $1.56
      Topcoat Grey $1.61
    • Kerry_J's avatar
      Kerry_J
      Copper Contributor
      Hi Sergei,
      You are the Bomb!!! It worked! Thank you so much!

Resources