ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating macros in Excel (https://www.excelbanter.com/excel-programming/388240-creating-macros-excel.html)

[email protected]

Creating macros in Excel
 
I need help with creating a function within excel worksheet. Which
will look for a keyword "Summary" and if it will find it then I would
like to highlight the entire row with green color.

Thank you


Gary''s Student

Creating macros in Excel
 
Sub virina()
Set r = ActiveSheet.UsedRange
For Each rr In r
If InStr(rr.Value, "Summary") < 0 Then
rr.EntireRow.Interior.ColorIndex = 10
End If
Next
End Sub

--
Gary''s Student - gsnu200717


" wrote:

I need help with creating a function within excel worksheet. Which
will look for a keyword "Summary" and if it will find it then I would
like to highlight the entire row with green color.

Thank you




All times are GMT +1. The time now is 05:18 PM.

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