Multiple "If"

  • Thread starter Thread starter LindaM
  • Start date Start date
L

LindaM

I am trying to write a formula that will multiple the numbers between 4 and
10 by $2.43 and add that to the numbers between 11 and 100 that is multiplied
by $1.75.
Example: A1 = 61 and the total in B1 would be 4 thru 10 multilplied by 2.43
and then added to 11 thru 61 that has been multiplied by 1.75
 
Do you mean that you want 4*2.43 + 5*2.43 + 6*2.43 + 7*2.43 + 8*2.43 +
9*2.43 + 10*2.43 + 11*1.75 + 12*1.75 +13*1.75 etc up to 61*1.75 ? (and
whatever for ?) Or, could it be that you want (10-4)*2.43 +
(61-11)*1.75 ?

Please explain.

Pete
 
One way would be this as an array formula (entered with Control shift
Enter), but there are other ways which may well be simpler.

=2.43*SUM(ROW(A1:INDIRECT("A"&MIN(10,A1))))+1.75*SUM(ROW(A11:INDIRECT("A"&A1)))*(A1>=11)

I'm guessing that you probably want to count only as far as your A1, even if
that is below 11.
 
Typo

=SUMPRODUCT(ROW(INDIRECT("4:10"))*2.43)+SUMPRODUCT(ROW(INDIRECT("11:"&A1)))*1.75
 
I mean the numbers between 4 and 10 which is 7*2.43 added to the numbers
between 11 and the total count up to 100 *1.75. If the total number is 61 it
would be 4-10 = 7 * 2.43 + 11-61=51*1.75. The total amount should equal
$106.25.
 
Hi,

With 61 in A1 try this, or have I misunderstood?

=MAX(0,(MAX(0,(A1-10)*1.75))+(A1-MAX(0,(A1-10))-3)*2.43)

Mike
 
Sorry, should have been
=2.43*SUM(ROW(A4:INDIRECT("A"&MIN(10,A1))))+1.75*SUM(ROW(A11:INDIRECT("A"&A1)))*(A1>=11)

I'd missed the fact that you were starting from 4, not from 1.

You may want to look at how it behaves, and how you want it to behave, if A1
is less than 4.
 
In that case, Linda, you can try this:

=IF(A1<4,0,IF(A1<11,(A1-3)*2.43,7*2.43+(A1-10)*1.75))

with 61 in cell A1.

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Multiple "IF" 1
Lookup 5
Help w/ formula 13
how to countif when using indirect cell 1
if command 2
The real Horizontal Formula question 4
If/Greater than & less than Formula assistance 9
SUMPRODUCT or SUMIF 17

Back
Top