![]() |
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 |
All times are GMT +1. The time now is 02:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com