How about:
activeworkbook.activesheet.Cells(lRow, 5).Formula = "=(C" & lRow & "/10)*D" & lRow
That should force XL to use the right sheet - I always preface the cells statement where there is the remotest chance xl can get confused !
How about this - decide which column you want to work with first and use the same bit of code to loop through it ?
If DaysAged = 60 Then
ncol = 3'C
Else
ncol = 2'B
End If
With Columns(ncol)
Do Until Cells(i) = "" 'Do until record is empty
CurrentVendorNo =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.