Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Jim for pointing out those..
"Jim Thomlinson" wrote: The line Set rngTemp = Cells.Find("Grand Total") may or may not find the cell depending on the current find settings which you can not know. Also the line 'Range("K3:K", rngTemp).Interior.ColorIndex = 15 will not work... 'Range("K3:K" & rngTemp.row).Interior.ColorIndex = 15 would be better. -- HTH... Jim Thomlinson "Jacob Skaria" wrote: Try the below macro which will work on the active sheet... Sub Macro() Dim rngTemp As Variant Set rngTemp = Cells.Find("Grand Total") If Not rngTemp Is Nothing Then 'highlight from the cell to k3 Range("K3", rngTemp).Interior.ColorIndex = 15 'or if you are looking to highlight only col K 'Range("K3:K", rngTemp).Interior.ColorIndex = 15 End If If this post helps click Yes --------------- Jacob Skaria "Karin" wrote: Hi, (Excel 2003) I'm writing a macro to format a report. I want to Find "Grand Total" and then move over to column K, highlight up to K3 (absolute) and fill with gray. How do I do that? Thank you. (FYI: The length of the report will change, and Ctrl End actually goes past the end of the report.) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deselect B1 & move curser to select A1 | Excel Discussion (Misc queries) | |||
Select & Move Range | Excel Discussion (Misc queries) | |||
Macro to select cells without a certain value and select a menu it | Excel Worksheet Functions | |||
How do I select all the even rows in a worksheet and move them. | Excel Discussion (Misc queries) | |||
Move select data to another worksheet | Excel Discussion (Misc queries) |