View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jk22 jk22 is offline
external usenet poster
 
Posts: 3
Default entering formula using cells notation

Hi - I am trying to write the following in a macro in excel

For k = 8 to 1000
........
For l = 1 To 50
If Cells(k + l, 2) < "" Then
Cells(k + l, 19).Formula = "=cells(k+l,19)/cells(k,19)" - does not
work in xls
Cells(k + l, 20).Formula = "=A1/B2" -
works in xls
End If
Next
..........

Can anyone suggest how to do this in loops?