Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default How to count the last 30 days of activities

Have several columns with details
Column A5 and down=Date
Column B5 and down=Activity
Column C5 and down=Type of transportation

I now have 250 rows with activities from today and back in time.
My question is how can I have a variable in A1 where I can ask the last X
days activities. I will choose in A1 how many days back in time the number of
activities done.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 108
Default How to count the last 30 days of activities

Hi MSSailor,

Have several columns with details
Column A5 and down=Date
Column B5 and down=Activity
Column C5 and down=Type of transportation

I now have 250 rows with activities from today and back in time.
My question is how can I have a variable in A1 where I can ask the last X
days activities. I will choose in A1 how many days back in time the number
of
activities done.


Put this formula in cell D5
=INT(NOW())-A5<=$A$1

This returns TRUE if the date in A5 is A1 days or less than today.

Filter for column D is TRUE

Ed Ferrero

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default How to count the last 30 days of activities

You wrote to put it in D5=INT(NOW())-A5<=$A$1
Can the value in D5 be the value that I can fill in.
If D15=30 ; is calculating numbers of activities 30 days back in time
starting from today
If D15=15 ; is calculating numbers of activities 30 days back in time
starting from today


Column A Column B
DATE ACTIVITY
A5=date 1 B5=Running
A6=date 2 B6=Jogging
A7=date 3 B7=Diving
An
A50 date 46 B46=Skiing

"Ed Ferrero" wrote:

Hi MSSailor,

Have several columns with details
Column A5 and down=Date
Column B5 and down=Activity
Column C5 and down=Type of transportation

I now have 250 rows with activities from today and back in time.
My question is how can I have a variable in A1 where I can ask the last X
days activities. I will choose in A1 how many days back in time the number
of
activities done.


Put this formula in cell D5
=INT(NOW())-A5<=$A$1

This returns TRUE if the date in A5 is A1 days or less than today.

Filter for column D is TRUE

Ed Ferrero


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default How to count the last 30 days of activities

Is there any advantage in using INT(NOW()) instead of TODAY() ?
--
David Biddulph

"Ed Ferrero" wrote in message
...
Hi MSSailor,

Have several columns with details
Column A5 and down=Date
Column B5 and down=Activity
Column C5 and down=Type of transportation

I now have 250 rows with activities from today and back in time.
My question is how can I have a variable in A1 where I can ask the last X
days activities. I will choose in A1 how many days back in time the
number of
activities done.


Put this formula in cell D5
=INT(NOW())-A5<=$A$1

This returns TRUE if the date in A5 is A1 days or less than today.

Filter for column D is TRUE

Ed Ferrero



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 108
Default How to count the last 30 days of activities

David Biddulph wrote,

Is there any advantage in using INT(NOW()) instead of TODAY() ?


No, old habit :)

Ed Ferrero
www.edferrero.com


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 108
Default How to count the last 30 days of activities

Hi MSSailor,

You wrote to put it in D5=INT(NOW())-A5<=$A$1
Can the value in D5 be the value that I can fill in.
If D15=30 ; is calculating numbers of activities 30 days back in time
starting from today
If D15=15 ; is calculating numbers of activities 30 days back in time
starting from today


Column A Column B
DATE ACTIVITY
A5=date 1 B5=Running
A6=date 2 B6=Jogging
A7=date 3 B7=Diving
An
A50 date 46 B46=Skiing


I mean put =INT(NOW())-A5<=$A$1 in cell D5
Then D5 will evaluate to TRUE or FALSE depending on the values in cells A1
and A5

If A1 = 30 (meaning you want the last 30 days activities)
And A5 = 12-3-2009
Then D5 will show TRUE

If A5 = 12-1-2009
Then D5 will show FALSE

Copy cell D5 down as far as you need to

Then use autofilter to show all the rows where column D = TRUE

As David Biddulph pointed out, you can simplify the formula to
=TODAY()-A5<=$A$1

Ed Ferrero
www.edferrero.com



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
Count Days more than 180 days prior to today Gregory Day Excel Worksheet Functions 4 March 28th 08 10:16 PM
When word says Install I want it count the days for 3 days w.o wee CYNTHIA Excel Worksheet Functions 1 March 23rd 08 05:28 AM
count days Dan Excel Discussion (Misc queries) 2 February 17th 08 11:16 PM
COUNT how many ROWS ago out of 10 days that the highest high in 10 days was made rhhince Excel Worksheet Functions 1 January 14th 07 09:56 PM
count days Larry New Users to Excel 3 June 2nd 06 04:24 PM


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

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"