ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   help with code (https://www.excelbanter.com/excel-programming/410999-help-code.html)

[email protected]

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



All times are GMT +1. The time now is 10:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com