Thread: help with code
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jzamilpa3@yahoo.com is offline
external usenet poster
 
Posts: 48
Default help with code

im trying to do a countif to check and then select those that are
counted for select those cells with wording and insert them as a
comment box in another sheet

Sub UpdateComments()
Dim a As Integer
With ActiveSheet
For a = 9 To 500
If WorksheetFunction.CountIf(.Columns("A:A"), .Cells(a,
2)) 1 Then
Each cel In Sheets(3).UsedRange.SpecialCells(xlCellTypeConstan ts)
With Sheets(16).Range(cel.Address)
.ClearComments
.AddComment Text:=cel.Text
End With
Next
End Sub