View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
lar.the.ever.so.slightly.lost lar.the.ever.so.slightly.lost is offline
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.