#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default 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
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
assign formula to another cell Dannycol Excel Worksheet Functions 3 May 12th 06 09:46 PM
Insert Row & Copy Formula redruthann Excel Worksheet Functions 0 March 26th 06 11:51 PM
how do I insert a row without the formula changing? BertiesMum Excel Discussion (Misc queries) 2 November 16th 05 10:10 PM
insert a new cell into an existing formula Debbie Excel Discussion (Misc queries) 3 March 14th 05 06:46 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


All times are GMT +1. The time now is 06:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"