Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default macro count date

Hi all
If I want a macro to count how many days from today, how can I do it? I
have excel column with sale date in the past and want to know which items are
sold more than 3 days ? The macro may be as below
IF
Today_date - date_sale 3
then
........
Thanks for your help
Daniel


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default macro count date

On Jun 25, 1:19 pm, Daniel wrote:
Hi all
If I want a macro to count how many days from today, how can I do it? I
have excel column with sale date in the past and want to know which items are
sold more than 3 days ? The macro may be as below
IF
Today_date - date_sale 3
then
.......
Thanks for your help
Daniel


I'm not sure I understand what you are asking, you're just asking how
to calculate the difference between two dates right?

I think that a simple search in Excel help would have shown that you
can use the function DATEDIF(start_date,end_date,unit) to do what you
want without a macro.

Excel has lots of happy things regarding dates.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default macro count date

Y es, I want to compare 2 dates: today date and dates in a column (sale
date). In this column there are many dates and I want conditionally pick
some rows which have more than 3 days

IF Today()- column name 3 ?
................................................

Don't know how I can do it
Thanks
Daniel


"lar.the.ever.so.slightly.lost" wrote:

On Jun 25, 1:19 pm, Daniel wrote:
Hi all
If I want a macro to count how many days from today, how can I do it? I
have excel column with sale date in the past and want to know which items are
sold more than 3 days ? The macro may be as below
IF
Today_date - date_sale 3
then
.......
Thanks for your help
Daniel


I'm not sure I understand what you are asking, you're just asking how
to calculate the difference between two dates right?

I think that a simple search in Excel help would have shown that you
can use the function DATEDIF(start_date,end_date,unit) to do what you
want without a macro.

Excel has lots of happy things regarding dates.


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 a value in a date range based on a date in another workshee. marsjune68 Excel Worksheet Functions 4 April 9th 09 10:31 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Count number of cells with date <today's date Cachod1 New Users to Excel 2 January 28th 06 02:37 AM
count the number of cells with a date <= today's date Cachod1 New Users to Excel 3 January 27th 06 09:14 PM


All times are GMT +1. The time now is 10:03 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"