View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten Niek Otten is offline
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