ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   want to highlight cell which having comment & greater than 0 (https://www.excelbanter.com/excel-discussion-misc-queries/231118-want-highlight-cell-having-comment-greater-than-0-a.html)

Devender

want to highlight cell which having comment & greater than 0
 
Want to highlight only those cell which are having comment and their value
is greater than 0

Gary''s Student

want to highlight cell which having comment & greater than 0
 
Try this small macro:

Sub hilight()
For Each r In ActiveSheet.UsedRange.SpecialCells(xlCellTypeComme nts)
If r.Value 0 Then
r.Interior.ColorIndex = 6
End If
Next
End Sub


--
Gary''s Student - gsnu200853


"Devender" wrote:

Want to highlight only those cell which are having comment and their value
is greater than 0



All times are GMT +1. The time now is 08:24 AM.

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