Reputation: 17
I am trying to get my invoice to autofill a cell when I pick a category from a combobox and then fill in a number in another cell. If the category is Residential, Duplex or Multi-Family the cost is the value entered into B28xthe value of the constant in F28 and this does work.
If I pick Deck I need it to use the same formula unless the Product is less than 60 in which case it should enter 60 as a minimum which does happen.
It's when I need it to return a value greater than 60 which would mean B28 is >400 that the problem arises. The value won't go over 60.
N41 is kind of a holding cell for the value for Deck. When the combobox is empty the formula returns false which I don't want to show in the cell.
Here is my formula
=IF(I13="Residential",(B28*F28),IF(I13="Duplex",(B28*F28),IF(I13="Multi- Family",(B28*F28),IF(I13="Deck",IF(N41=0,MAX(0),IF(N41<112.5,MAX(60),IF(N41>=60,MIN(N41),"")))))))
Upvotes: 0
Views: 54
Reputation: 35990
Min() and Max() are usually used with two arguments, to deliver the smaller or the bigger of two values respectively. You use it with one parameter only, which will return exactly that number. That does not make any sense.
Also, consider using OR() to bundle the first three IFs into one.
It is not clear what the last part of the formula is meant to achieve.
=IF(OR(I13="Residential",I13="Duplex",I13="Multi- Family"),B28*F28,IF(I13="Deck",IF(N41=0,0,<here is where it gets unclear>))))
Please edit your question and clarify, making sure to post the values and formulas of the contributing cells.
Upvotes: 0