SUM with an IF

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following data in a spreadsheet
TL-1 Tons-1 TL-2 Tons-2 TL-3 Tons-
1 15 2 15 3 3
1 15 2 45 3 6

As you can tell, TL-1 and TL-2 are added to produce TL-3, the same with Tons 1 and 2. I want to make it so that for every mulitple of 22 (22, 44, 66, etc.) the sum of Tons-1 and Tons-2 generates that number of additional TL's, while subtracting that multiple from Tons. In other words, I want it to look like this

TL-1 Tons-1 TL-2 Tons-2 TL-3 Tons-
1 15 2 15 4
1 15 2 45 5 1

I hope this makes sense, and that someone has an idea for me to try. Thanks!
 
Rawley,

For Tons-3, try:
=MOD((TL1+TL2),22)

However, I don't understand how you arrive at 4 and 5 for TL-3.

HTH
Anders Silven


RAWLEY said:
I have the following data in a spreadsheet:
TL-1 Tons-1 TL-2 Tons-2 TL-3 Tons-3
1 15 2 15 3 30
1 15 2 45 3 60

As you can tell, TL-1 and TL-2 are added to produce TL-3, the same with Tons 1
and 2. I want to make it so that for every mulitple of 22 (22, 44, 66, etc.)
the sum of Tons-1 and Tons-2 generates that number of additional TL's, while
subtracting that multiple from Tons. In other words, I want it to look like
this:
 
if thee data are in columns a,b,c,d,e
enter "=A2+C2 +int((B2+D2)/22)" into Cell D2 and
"=mod(B2+D2,22)" into cell E2
-----Original Message-----
I have the following data in a spreadsheet:
TL-1 Tons-1 TL-2 Tons-2 TL-3 Tons-3
1 15 2 15 3 30
1 15 2 45 3 60

As you can tell, TL-1 and TL-2 are added to produce TL-3,
the same with Tons 1 and 2. I want to make it so that for
every mulitple of 22 (22, 44, 66, etc.) the sum of Tons-1
and Tons-2 generates that number of additional TL's, while
subtracting that multiple from Tons. In other words, I
want it to look like this:
 
See the answer from bj, which is like
=TL_1+TL_2+INT((Tons_1+Tons_2)/22)

Regards,
Anders Silven
 

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

Back
Top