Julie
Julie

Reputation: 1

IF formula nesting in Excel

I need help with a formula. The daily rate for painting is:

For example, if you paint for 5.5 days, you get paid $100 for each of the first three days and $90 for each of the remaining 2.5 days giving a total of $525.

How can I put this as a IF formula?

Upvotes: 0

Views: 42

Answers (2)

Rosetta
Rosetta

Reputation: 2725

assuming the days is in column A

IF(A1>3, 300+(A1-3)*90, A1*100)

Upvotes: 0

teylyn
teylyn

Reputation: 35900

I don't think that needs an IF at all. You could do this:

=MAX(0,(A1-3))*90+(MIN(3,A1)*100)

Subtract 3 from the value in A1. Any result greater than zero you will be multiplied by 90. Any result less than zero will be ignored. Then work out what is smaller: A1 or 3. Whichever is the smallest will be multiplied by 100.

Upvotes: 2

Related Questions