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

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: 3,440
Default IF, SUM, VLOOKUP...oh my!!

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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default IF, SUM, VLOOKUP...oh my!!

One way:

=--(SUMPRODUCT(--($D$1:$D$10000<=D50),--($D$1:$D$10000=(D50-0.25)),
--($E$1:$E$10000=0),--($E$1:$E$10000<=0.3),--($E$1:$E$10000<""))0)

In article ,
Paul wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 661
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 661
Default IF, SUM, VLOOKUP...oh my!!

I don't know if I need to REpost this question or wait for a reply. Please
refer to my original post and my follow up information.
Thanks for all your help...
Paul

"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
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
IF(AND(val1=VLOOKUP( );val2>=VLOOKUP( );val2<=VLOOKUP( );VLOOKUP( Oso Excel Worksheet Functions 2 January 26th 05 06:56 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 06:44 PM.

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"