Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 661
Default Ref earlir post "If, SUM, VLOOKUP...oh my!!"

Maybe I didn't provide enough information...The cell F50 example was just a
random cell I choose. Hopefully this extra information can zero in on what I
want.
Let's start with cell F84 (I am sure there are 6 hours of prior information
from D84 back to D36, but it will not always be 49 rows).
The time information (column 'D' is data collected from rain gauges recorded
every 5 minutes). The values in column 'E' record amount of rain. The end of
a rain event is defined by 6 hours of 0 rain fall (based on 6 hours and 0
values). I want the range to look back 6 hours (column 'D' and sum the values
in column 'E'). If the sum is 0, then it determines the end of the rain event
and returns a value of 1. If the sum is 0, then the rain event has not
ended and returns a value of " ", thus allowing the cycle to continue until a
value of 1 (zero rain fall for 6 hours) has occured. I have another formula
that "grabs" the begining and ending times of the rain event, but I need the
formula to define a rain event. Hopefully this clarifies, not confuses you
more.
Thanks for the reply,
Paul

"Niek Otten" wrote:

Hi Paul,

Your example doesn't work because in F50 there is no 6 hours prior. The first possible one is in row 73. I assume that you want to
sum only the numbers smaller than or equal to .3 and greater than or equal to zero.
Formula:

=SUMIF(E1:E73,"<=.3",E1:E73)-SUMIF(E1:E71,"<0",E1:E73)

You can copy this formula down, it will adjust automatically.
You'll have to decide what to do with the rows above.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Paul" wrote in message ...
|I hope someone can help...
| I can not seem to come up with a formula to do what I want.
| I think the formula will contain "IF", "SUM", and "VLOOKUP", but I am not
| 100% sure. It could also be 'SUMIF'.
| Here is the situation.
| I have a column 'D' of time. The dates range for 2 months every 5 minutes.
| I have a column 'E' of values (mostly between 0.0 and 0.3).
| In column 'F' I would like to make a formula.
| Let's say I am in cell F50...What I want the range to be is [D50:D50-0.25]
| (6 hours prior)...I want to add the values in the 'E' column that fall within
| this range I just stated.
| Does that make sense?
| I think if someone could help me with that, I could probably complete the
| rest of the formula. The rest of the formula is: if the sum of the range is
| equal to 0 then 0, if the sum of the range is 0 then 1. I have another
| formula based on the 0 &1 result.
| Thanks,
| Paul


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Ref earlir post "If, SUM, VLOOKUP...oh my!!"

Hi,

Maybe:

=IF(SUMPRODUCT(($D$2:$D$2000<=D2)*($D$2:$D$2000=( D2-0.25)),$E$2:$E$2000)=0,1,"")

HTH
Jean-Guy

"Paul" wrote:

Maybe I didn't provide enough information...The cell F50 example was just a
random cell I choose. Hopefully this extra information can zero in on what I
want.
Let's start with cell F84 (I am sure there are 6 hours of prior information
from D84 back to D36, but it will not always be 49 rows).
The time information (column 'D' is data collected from rain gauges recorded
every 5 minutes). The values in column 'E' record amount of rain. The end of
a rain event is defined by 6 hours of 0 rain fall (based on 6 hours and 0
values). I want the range to look back 6 hours (column 'D' and sum the values
in column 'E'). If the sum is 0, then it determines the end of the rain event
and returns a value of 1. If the sum is 0, then the rain event has not
ended and returns a value of " ", thus allowing the cycle to continue until a
value of 1 (zero rain fall for 6 hours) has occured. I have another formula
that "grabs" the begining and ending times of the rain event, but I need the
formula to define a rain event. Hopefully this clarifies, not confuses you
more.
Thanks for the reply,
Paul

"Niek Otten" wrote:

Hi Paul,

Your example doesn't work because in F50 there is no 6 hours prior. The first possible one is in row 73. I assume that you want to
sum only the numbers smaller than or equal to .3 and greater than or equal to zero.
Formula:

=SUMIF(E1:E73,"<=.3",E1:E73)-SUMIF(E1:E71,"<0",E1:E73)

You can copy this formula down, it will adjust automatically.
You'll have to decide what to do with the rows above.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Paul" wrote in message ...
|I hope someone can help...
| I can not seem to come up with a formula to do what I want.
| I think the formula will contain "IF", "SUM", and "VLOOKUP", but I am not
| 100% sure. It could also be 'SUMIF'.
| Here is the situation.
| I have a column 'D' of time. The dates range for 2 months every 5 minutes.
| I have a column 'E' of values (mostly between 0.0 and 0.3).
| In column 'F' I would like to make a formula.
| Let's say I am in cell F50...What I want the range to be is [D50:D50-0.25]
| (6 hours prior)...I want to add the values in the 'E' column that fall within
| this range I just stated.
| Does that make sense?
| I think if someone could help me with that, I could probably complete the
| rest of the formula. The rest of the formula is: if the sum of the range is
| equal to 0 then 0, if the sum of the range is 0 then 1. I have another
| formula based on the 0 &1 result.
| Thanks,
| Paul


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
Ref earlier post "Excel Time Calculation" jc Excel Discussion (Misc queries) 4 November 7th 07 08:32 PM
"Disk is Full" add-on question to "Can't reset last cell" post tod [email protected] Excel Discussion (Misc queries) 0 January 22nd 07 02:32 AM
Related to "Counting cells..." (post below) jimbob Excel Discussion (Misc queries) 1 July 4th 06 08:23 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Should I generally request "post a poll" when I post a new thread? Joe Miller Excel Discussion (Misc queries) 2 January 7th 06 04:46 PM


All times are GMT +1. The time now is 01:09 PM.

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

About Us

"It's about Microsoft Excel"