Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default Total last 30 days

I have dates in column A
Numbers in column B

I want to find the sum of numbers on column B that correspond to the last 30
days (including today), 90 days, 6 months, 1 year.

I used
=SUMIF(A:A,(TODAY()-30),B:B)+SUMIF(A:A,(TODAY()-29),B:B)+SUMIF(A:A,(TODAY()-28),B:B)... etc. until I got 30 days.

Q? Is there an easier formula/method?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 299
Default Total last 30 days

=SUMPRODUCT(--(A2:A1000=TODAY()-30),--(A2:A1000<=TODAY()),B2:B1000)

adapt to fit for the rest of the dates


Note that you cannot use the whole column A:A unless you use Excel 2007
--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(Remove ^^ from email)


"Eric" wrote in message
...
I have dates in column A
Numbers in column B

I want to find the sum of numbers on column B that correspond to the last
30
days (including today), 90 days, 6 months, 1 year.

I used
=SUMIF(A:A,(TODAY()-30),B:B)+SUMIF(A:A,(TODAY()-29),B:B)+SUMIF(A:A,(TODAY()-28),B:B)...
etc. until I got 30 days.

Q? Is there an easier formula/method?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Total last 30 days

Hi

=SUMIF($A:$A,"=" & (TODAY()-30,$B:$B)


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Eric" wrote in message
...
I have dates in column A
Numbers in column B

I want to find the sum of numbers on column B that correspond to the last
30
days (including today), 90 days, 6 months, 1 year.

I used
=SUMIF(A:A,(TODAY()-30),B:B)+SUMIF(A:A,(TODAY()-29),B:B)+SUMIF(A:A,(TODAY()-28),B:B)...
etc. until I got 30 days.

Q? Is there an easier formula/method?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,560
Default Total last 30 days

=SUM(SUMIF(A:A,(TODAY()-{30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,1 4,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0}),B:B))

"Eric" wrote:

I have dates in column A
Numbers in column B

I want to find the sum of numbers on column B that correspond to the last 30
days (including today), 90 days, 6 months, 1 year.

I used
=SUMIF(A:A,(TODAY()-30),B:B)+SUMIF(A:A,(TODAY()-29),B:B)+SUMIF(A:A,(TODAY()-28),B:B)... etc. until I got 30 days.

Q? Is there an easier formula/method?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,560
Default Total last 30 days

for 30dayts/1 month - =SUM(SUMIF(A:A,"="&(TODAY()-30),B:B)) or
=SUMIF(A:A,"="&DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY())),B:B)

for 90 days/3 months - =SUM(SUMIF(A:A,"="&(TODAY()-90),B:B)) or
=SUMIF(A:A,"="&DATE(YEAR(TODAY()),MONTH(TODAY())-3,DAY(TODAY())),B:B)

for 180 days/ 6 months - =SUM(SUMIF(A:A,"="&(TODAY()-182),B:B)) or
=SUMIF(A:A,"="&DATE(YEAR(TODAY()),MONTH(TODAY())-6,DAY(TODAY())),B:B)

for 365 days/1 year - =SUM(SUMIF(A:A,"="&(TODAY()-365),B:B)) or
=SUMIF(A:A,"="&DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())),B:B)

"Eric" wrote:

I have dates in column A
Numbers in column B

I want to find the sum of numbers on column B that correspond to the last 30
days (including today), 90 days, 6 months, 1 year.

I used
=SUMIF(A:A,(TODAY()-30),B:B)+SUMIF(A:A,(TODAY()-29),B:B)+SUMIF(A:A,(TODAY()-28),B:B)... etc. until I got 30 days.

Q? Is there an easier formula/method?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 860
Default Total last 30 days

Hi Eric,

If you have multiple entries on the same dates then Peo's formula
will work admirably. If you only have one entry per day then you
are overcomplicating things.

In that situation all that is needed is to put =SUM(B1:B30) into
C30 and drag it down to the end of your data. If you want to drag
it past the end of your data to allow for future input, then make it
=IF(B30="","",SUM(B1:B30)

HTH
Martin


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default Total last 30 days

Thanks to everyone...

all really great ideas.

Eric

"MartinW" wrote:

Hi Eric,

If you have multiple entries on the same dates then Peo's formula
will work admirably. If you only have one entry per day then you
are overcomplicating things.

In that situation all that is needed is to put =SUM(B1:B30) into
C30 and drag it down to the end of your data. If you want to drag
it past the end of your data to allow for future input, then make it
=IF(B30="","",SUM(B1:B30)

HTH
Martin



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
Running total of hours based on last 7 days Steve Excel Worksheet Functions 1 February 22nd 07 01:40 PM
get a runing total for"curent date"or(cell)minus prev 30 days( cel dustin Excel Worksheet Functions 2 August 1st 06 09:59 AM
total a time column that is formatted as ddd:hh:mm:ss .ddd=days Bridget Excel Worksheet Functions 3 January 9th 06 02:05 AM
how do i display the total number of days in the current month in. timerigger Excel Discussion (Misc queries) 6 March 20th 05 05:13 PM
running total for last 7 calender days md83 Excel Discussion (Misc queries) 1 March 5th 05 03:43 AM


All times are GMT +1. The time now is 09:00 AM.

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"