LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default IF DATE Statement help please


I'm clear on what it is that you're tryign to achieve.


dim source as range
IF Day(Date)= 1 AND format$(date,"DDD") = "Sun" THEN
set source = Range("A1")
ELSEIF Day(Date)= 1 AND format$(date,"DDD") ="Sat" THEN
set source = Range("A2")
ELSE
set source = Range("A3")
END IF


some might suggest that instead of
format$(date,"DDD")
you could use the WEEKDAY() function. Makes no difference to the logic
either way

"Simon" wrote:

Hi I would like to use the following type of statement (I think
unfortunately my brain is in "Excel not VBA mode"):

IF

Then Else

Or Else

I wish to use the criteria that If date (date = 1st of the month) AND
Day = Sun, =Range("A1")
If Day = Sat AND DATE = 1 = Range("A2")
Else = Range("A3")

Thanks for your help

 
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
If Statement for a date jlo Excel Worksheet Functions 4 June 17th 09 06:02 PM
if statement with date JJ Excel Worksheet Functions 2 April 9th 09 08:03 PM
How can I use a date in an IF/AND statement? gsmith Excel Discussion (Misc queries) 2 July 13th 05 12:27 AM
If statement with date Tanya Excel Discussion (Misc queries) 4 May 20th 05 01:42 AM
Date in an IF statement LyndieBee Excel Worksheet Functions 2 March 8th 05 04:11 PM


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