View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Automatically calculate the previous days total 'sales'

If you always want to summarise yesterdays data then this formula is probably
better

=SUMPRODUCT((A1:A20=TODAY()-1)*(B1:B20)*(C1:C20))

The issue with the dates in your columns remains an issue.

Mike

"Mike H" wrote:

Hi,

I think you have a fundamental problem with the way you are deriving the
date. If you use the today() function then 'tomorrow' the date will change to
tomorrows date as it becomes 'today'

I you overcome the date issue by (say) paste special paste values over the
dates then this formula should do the sums for you

=SUMPRODUCT((A1:A20=D1)*(B1:B20)*(C1:C20))

Where D1 is the date to summarise

Mike

"PVANS" wrote:

Good morning, I hope someone can help.

I have a worksheet that has the following three columns:
Date Reciept Price

The worksheet is compiled automatically from information coming from the
primary worksheet in the workbook.

The date is generated each day using the =today() function.

What I need to happen is at the start of a new day, a macro that totals all
of the amounts in the previous days prices.

I will give a mini view of what the worksheet looks like:
Date Reciept Price
16/07/09 1 100
16/07/09 2 100
16/07/09 3 100
17/07/09 4 100
17/07/09 5 100

Therefore, I wish the formula to automatically add each days total prices
together and show the answer in a new cell. I found that the SumIF formula
will do a single days result, however I need this to happen every day without
me needing to code a macro for each specific date.

Thanks in advance for the help