How to insert formula to a range of cells from VBA?

  • Thread starter Thread starter crapit
  • Start date Start date
C

crapit

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()) )
 
This will create a circular reference. Record entry of the formula.
This will give you the formula syntax in VBA. Then add it to this line
of code...

ThisWorkbook.Sheets(1).Range("E2:J26").FormulaR1C1 = '''Your recorded
formula here

Hth
Oj
 
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )

It seems to have problem with wording enclose in " "!
 
Back
Top