Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Calculate difference between cells with possible gap

I have a WS monitoring use of water on a daily basis. In column A i have the
dates for a whole year, in column B I put in the amount of liters passed the
measuring device and in column C i have a formula that gives the amount of
water used since last reading. (Simply latest value - previous value)

My problem occurs when there comes a day when the counter has not been
checked and there is no input value. I Want to ceep all dates in Column A

How can I solve this?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Calculate difference between cells with possible gap

Post you column C formula

"Espen Rostad" wrote:

I have a WS monitoring use of water on a daily basis. In column A i have the
dates for a whole year, in column B I put in the amount of liters passed the
measuring device and in column C i have a formula that gives the amount of
water used since last reading. (Simply latest value - previous value)

My problem occurs when there comes a day when the counter has not been
checked and there is no input value. I Want to ceep all dates in Column A

How can I solve this?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Calculate difference between cells with possible gap

=MAKSA(B8-B7;0)

MAKSA could be MAX in english version. This is to avoid getting the negative
results in cell below last registered (in column C). I need to avoid this
becaus I have summarys for week and month.

Mike H skrev:

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Calculate difference between cells with possible gap

Hi,

Try this suitably altered to meet your regional syntax

=MAX(B2-LARGE($B$1:B2,2),0)

basically because the numbers (meter reading) should be in ascending order
you can find the second largest number which should be the previous reading
and use that.

Mike

"Espen Rostad" wrote:

=MAKSA(B8-B7;0)

MAKSA could be MAX in english version. This is to avoid getting the negative
results in cell below last registered (in column C). I need to avoid this
becaus I have summarys for week and month.

Mike H skrev:

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Calculate difference between cells with possible gap

If you could be so kind to explain what the different elements of that
formula refers to I might be able ti alter it to work for me. I have some
diffuculties getting the formula to work

Mike H skrev:



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Calculate difference between cells with possible gap

Hi,

I have envisaged your data looking like this

col A Col B Col C
01/01/2009 123
02/01/2009 456 333
03/01/2009 789 333
04/01/2009 0
05/01/2009 999 210

My formula goes in C2 and is dragged down and will return results like above.

=MAX(B2-LARGE($B$1:B2,2),0)


Mike

"Espen Rostad" wrote:

If you could be so kind to explain what the different elements of that
formula refers to I might be able ti alter it to work for me. I have some
diffuculties getting the formula to work

Mike H skrev:

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to auto calculate difference between cells like c1=a1-b1 Jill Excel Worksheet Functions 2 May 1st 08 05:46 PM
calculate the difference between two cells jrivel Excel Discussion (Misc queries) 2 October 31st 06 02:08 PM
Calculate the difference between two times Buffgirl71 Excel Worksheet Functions 1 February 9th 06 10:10 PM
Calculate time difference between cells sky Excel Discussion (Misc queries) 3 January 23rd 06 11:09 AM
Calculate the difference two times Chi Excel Discussion (Misc queries) 2 July 16th 05 08:31 PM


All times are GMT +1. The time now is 02:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"