Morning,
You don't need a loop, a single statement will do it
range("F8:F300").Formula = "=IF(D8$D$4,D8-$D$4,0)"
Not sure what the second part meant, but looking at Rick's reply, if he
interprets it correctly, it can be done with
range("F8:F300").Formula = "=IF(AND(C8=DATE(2004,1,15),E8=""AVE
US""),IF(D8$D$4,D8-$D$4,0),"""")"
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"japorms " wrote in message
...
Hello guys and guru's
I need help in creating a macro. I am a newbie and browsing the help
file but reallly I cant get it.
I need a macro that will put this formula =IF(D8$D$4,D8-$D$4,0)
at F8 to F300
if it satisfy this condition that will look in column E8 to E300 is
equal to "AVE US" And column C8 to C300 is equal to "1/15/2004"
Its giving me a headache coz it has too many condition for a beginner.
If anybody can help please....
---
Message posted from http://www.ExcelForum.com/