Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default if today is last day of month then, else

sory little error on previous post


i got a macro to copy and special paste data in order to get a accumalative
sales data. i want to add to it so that it check if today is the last day of
the month.

something like

if now() = lastday of month then
range a1.value =""
else
run mymacro
end if


thanx
Phillip

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default if today is last day of month then, else

You have responses at your other post that you should be able to tweak.

pswanie wrote:

sory little error on previous post

i got a macro to copy and special paste data in order to get a accumalative
sales data. i want to add to it so that it check if today is the last day of
the month.

something like

if now() = lastday of month then
range a1.value =""
else
run mymacro
end if

thanx
Phillip


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default if today is last day of month then, else

My answer will be the same as in my previous posting... put your code in the
appropriate section of the If-Then-Else blocks (just read the comments to
see which block does what).

Also, for future reference, it is better to keep follow up postings in the
same thread as the original posting appeared in.

Rick


"pswanie" wrote in message
...
sory little error on previous post


i got a macro to copy and special paste data in order to get a
accumalative
sales data. i want to add to it so that it check if today is the last day
of
the month.

something like

if now() = lastday of month then
range a1.value =""
else
run mymacro
end if


thanx
Phillip


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default if today is last day of month then, else

jip all that worked but... i only later noticed and relized that it should
be if today is the first day of the month

"pswanie" wrote:

sory little error on previous post


i got a macro to copy and special paste data in order to get a accumalative
sales data. i want to add to it so that it check if today is the last day of
the month.

something like

if now() = lastday of month then
range a1.value =""
else
run mymacro
end if


thanx
Phillip

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default if today is last day of month then, else

If Day(Date) = 1 Then
' << Today is the first day of the month
Else
' << Today is not the last day of the month
End If

Rick


"pswanie" wrote in message
...
jip all that worked but... i only later noticed and relized that it
should
be if today is the first day of the month

"pswanie" wrote:

sory little error on previous post


i got a macro to copy and special paste data in order to get a
accumalative
sales data. i want to add to it so that it check if today is the last
day of
the month.

something like

if now() = lastday of month then
range a1.value =""
else
run mymacro
end if


thanx
Phillip




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
=today() less one month Jim Excel Discussion (Misc queries) 4 November 19th 09 04:43 PM
THe Last DATE of the previous month from today CmK Excel Worksheet Functions 6 May 4th 07 03:20 PM
Today() ... Month() ... Formatt mmm Ken Excel Discussion (Misc queries) 4 March 2nd 07 05:01 PM
Days in a month as of today Daniel Q. Excel Worksheet Functions 2 January 25th 07 07:15 PM
conditional format for if month(today) = xxx Todd Excel Worksheet Functions 3 January 24th 07 12:16 AM


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