Formula for subtracting multiple meter readings for usage totals?

T

ttam78ouch

Is there a formula I can use to subtract meter readings to show usages. For
Example:
A B C D E
1 Date Meter1 Usage1 Meter2 Usage2
2 1/1/01 25 25 10 10
3 1/2/01 30 5 26 16
4 1/3/01 30 4
5 1/4/01 36 ?
6 1/5/01 39 3 40 ?

In the crude example above the meter readings are manually put in where the
usage formulas were IF formulas. However I am trying to get away from using
IF formulas or nested IF formulas since I have no idea how many blank entries
there will be in a row nor do I know when there will be blank entries?

Does anyone know of a formula (not a macro) that can accomplish this
perplexing situation?
 
R

Rick Rothstein \(MVP - VB\)

You have to put the first values in B2 and D2; but then

Put this in C3 and copy down... =IF(B3="","",B3-SUM(C$2:C2))

Put this in D3 and copy down... =IF(D3="","",D3-SUM(E$2:E2))

Rick
 
T

T. Valko

Try these:

Enter this formula in C2 and copy down as needed:

=IF(B2="","",IF(COUNT(B$2:B2)=1,B2,B2-LOOKUP(1E100,B$1:B1)))

Enter this formula in E2 and copy down as needed:

=IF(D2="","",IF(COUNT(D$2:D2)=1,D2,D2-LOOKUP(1E100,D$1:D1)))
 
T

ttam78ouch

Thank you . . . worked great!

Rick Rothstein (MVP - VB) said:
You have to put the first values in B2 and D2; but then

Put this in C3 and copy down... =IF(B3="","",B3-SUM(C$2:C2))

Put this in D3 and copy down... =IF(D3="","",D3-SUM(E$2:E2))

Rick
 

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

Top