Excel Highlight Macro
Posted by Peter Crymble on October 15, 2001 10:09 AM
I have a spreadsheet which shows a person, their department and points scored for an incentive scheme. I have a macro that filters by department and sorts the points - so that the top scorers for each department can be seen.
However, I need to highlight the top 2 fields for each department. e.g. when i filter by say the technology department, the top two rows should be highlighted. I can do this by changing the bckground color but heres my problem. The highlight macro only works if rows 1 and 2 are displayed. What happens when the filter is on and say rows 50 and 60 are shown. I cant write individual macros as the row numbers will change. How do I highlight the top 2 rows, no matter what row number they are?
Thanks for all your help,