Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If Statement for a date | Excel Worksheet Functions | |||
if statement with date | Excel Worksheet Functions | |||
How can I use a date in an IF/AND statement? | Excel Discussion (Misc queries) | |||
If statement with date | Excel Discussion (Misc queries) | |||
Date in an IF statement | Excel Worksheet Functions |