VB syntax help requested

  • Thread starter Thread starter anny
  • Start date Start date
A

anny

Hi

This code works well when placed in cell C5 of worksheet PrintRpts.

=INDEX(MasterList!F:F,MATCH(A8,MasterList!A:A,0))

But, I need to do the same thing by VB, and my syntax needs fixing:

Worksheets("PrintRpts").Range("C5") =
INDEX(MasterList!F:F,MATCH(A8,MasterList!A:A,0))


suggestions appreciated
anny
 
Do you want the formula placed in that cell or do you want the value?

with worksheets("printrpts").range("c5")
.formula = "=INDEX(MasterList!F:F,MATCH(A8,MasterList!A:A,0))"
.value = .value 'only if you want
end with
 
Back
Top