View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
OBee OBee is offline
external usenet poster
 
Posts: 4
Default It's summing but forward in time as well...

Dear Rick,

I was experimenting with data using your equation below and came across this
problem: if someone by mistake inputs work hours for the next few days, then
this equation sums those hours up as well. How can I ensure the equation
sums up the hrs from "today" to "today-30 days" ONLY, and not the hrs beyond
"today" as well?

Thanks,
obee

"Rick Rothstein (MVP - VB)" wrote:

Assuming your dates are in Column A and your hour values are in Column B...

=SUMIF(A1:A200,"="&(TODAY()-30),B1:B200)

You can set the ranges to cover future entries (if there is no date or no
hours, nothing will be added for those data rows).

Rick


"OBee" wrote in message
...
Dear Friends,

I have daily entries of work hours for 4 months that I need to sum on a
30-day basis. I need these hours added up for the last 30 days, as of
today.
I've tried multiple functions such as SUMIF and combination of SUM and IF
without any luck.

Please help me with this problem.

Thanks,
Obee