Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
insert formula
i am writing a macro and would like to insert a formula in like this
Range("H10").FormulaArray = "=IF((WEEKDAY(DATE(YEAR(H9)+$D$1,MONTH(H9)+$D$2,DA Y(H9)+$D$3),1)-1)*(WEEKDAY(DATE(YEAR(H9)+$D$1,MONTH(H9)+$D$2,DAY( H9)+$D$3),1)-7)=0,WORKDAY(DATE(YEAR(H9)+$D$1,MONTH(H9)+$D$2,DAY (H9)+$D$3),-1),DATE(YEAR(H9)+$D$1,MONTH(H9)+$D$2,DAY(H9)+$D$3) )" the formula works fine.. but the '=' sign inside the quotes is causing some problems how do i overcome this. basically i am trying to ass one month to a date. if the result is not a weekday, then, i shift the result to one previous weekday |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
assign formula to another cell | Excel Worksheet Functions | |||
Insert Row & Copy Formula | Excel Worksheet Functions | |||
how do I insert a row without the formula changing? | Excel Discussion (Misc queries) | |||
insert a new cell into an existing formula | Excel Discussion (Misc queries) | |||
Challenging Charting | Charts and Charting in Excel |