Running Total, total usage for the day

millerco

New Member
Joined
Mar 17, 2018
Messages
3
Hello, I need help with a formula or macro(?) to provide the difference between to meter readings. The catch is I would like a running total reading ,similar to the odometer in your car, but the meter only has 7 digits, when the meter gets to 99999999, it rolls over to zeros but i need excel to do the math for the difference the two readings. Example: day one reading is 9898989, day two reading 0000005. usage would be 101011, but the only way i can figure to do it I get a neg number.


Thank you for your help.

Trevor
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi,

Since your meter readings may look like 0000123, which means they're formatted as Text, the following will work:


Book1
ABCD
11st reading2nd readingTotal
298989890000005101016
39876543993456758024
Sheet34
Cell Formulas
RangeFormula
D2=IF(B2+0)
 
Upvote 0
You're welcome, welcome to the forum.
 
Upvote 0
Another question, how can I stop this formula from calculating until cell B has the reading in it?

Thank you,
Trevor
 
Upvote 0
Use this updated formula:


Book1
ABCD
11st reading2nd readingTotal
298989895101016
39876543
4
59876543993456758024
Sheet23
Cell Formulas
RangeFormula
D2=IF(OR(A2="",B2=""),"",IF(B2+0))


Change the "" highlighted Red below to 0 if you prefer to show 0 rather than Blank.

Rich (BB code):
=IF(OR(A2="",B2=""),"",IF(B2+0<A2+0,10000000-A2+B2,B2-A2))
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top