Comment in every 11th row

  • Thread starter Radhakant Panigrahi
  • Start date
R

Radhakant Panigrahi

Hi,

can anybody help me...i have 3 columns and i need a comment "Audit" ini
column D in every 11th row.Is it possible to have any formula or VBA for
this....

regards,
rkp
 
J

Jacob Skaria

Try

Sub MyMacro()
Dim lngRow As Long
For lngRow = 11 To Cells(Rows.Count, "D").End(xlUp).Row Step 11
Range("D" & lngRow).AddComment "Audit"
Next
End Sub
 
J

Jacob Skaria

Try the below version instead..

Sub MyMacro()
Dim lngRow As Long
For lngRow = 11 To Cells(Rows.Count, "D").End(xlUp).Row Step 11
If Range("D" & lngRow).Comment Is Nothing Then
Range("D" & lngRow).AddComment "Audit"
End If
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top