View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default How to insert formula to a range of cells from VBA?

Range("E2:E6").Formula = "=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )