Sam Calabrese
New Member
- Joined
- Dec 26, 2014
- Messages
- 5
Most of us know the 'trick' where we use Excel's Find -> Find All option, then press CTRL-A to select all the result cells containing the search target. Then we exit the search dialogue and apply formatting to the cells (which remain selected). To highlight entire rows containing the selected cells [because they're much easier to see that way] I came up with this simple macro through trial & error:
Sub HilightRowsWithSelectedCells()
Run the macro immediately after exiting the Search dialogue and all rows [containing cells selected by the Find All option] will be selected and ready for the formatting of your choice. Very useful for quickly highlighting records needing further attention later or by another party - especially since formatting may be chosen on-the-fly for each 'Find All' result. Assigning the macro to a shortcut key combo or assigning it to a QAT button is recommended if [like me] you do a lot of this.
Note this seems to work no matter how the cells are selected. If you manually select of bunch of cells and want to highlight their rows, this is quick and easy.
V/R,
SamCal
Oak Harbor, WA
- Posting guidelines, forum rules and terms of use
- Try searching for your answer first, see how
- Read the FAQs
- List of BB codes
Sub HilightRowsWithSelectedCells()
Selection.EntireRow.Activate
End Sub
Run the macro immediately after exiting the Search dialogue and all rows [containing cells selected by the Find All option] will be selected and ready for the formatting of your choice. Very useful for quickly highlighting records needing further attention later or by another party - especially since formatting may be chosen on-the-fly for each 'Find All' result. Assigning the macro to a shortcut key combo or assigning it to a QAT button is recommended if [like me] you do a lot of this.
Note this seems to work no matter how the cells are selected. If you manually select of bunch of cells and want to highlight their rows, this is quick and easy.
V/R,
SamCal
Oak Harbor, WA
- Posting guidelines, forum rules and terms of use
- Try searching for your answer first, see how
- Read the FAQs
- List of BB codes