Hello everyone,
I have a data sheet which has 1500 rows and 7 columns. So I need to highlight selected row and column when hit the find facility in order to prevent miscalculation.
Can you please help me.
Thank you
Hello everyone,
I have a data sheet which has 1500 rows and 7 columns. So I need to highlight selected row and column when hit the find facility in order to prevent miscalculation.
Can you please help me.
Thank you
Last edited by hanamichi sakuragi; 09-16-2015 at 05:27 AM.
Hi there,
The following code will do what you want provided that your data range does not contain any cells which have coloured backgrounds:
Please Login or Register to view this content.
The highlighted values can be altered to suit your own requirements.
The above code highlights only the part of the row/column which is contained within the data range - it can easily be adapted to highlight the entire row/column if required.
If any of the cells in your data range have coloured backgrounds, the code will become significantly more complicated.
Hope this helps - please let me know how you get on.
Regards,
Greg M
Hi again,
Thanks for your private message regarding the above.
The attached workbook incorporates the code from my previous post, and is inserted in the VBA CodeModule for the "Highlight" worksheet. To view the code in the CodeModule just right-click on the worksheet tab ("Highlight") and select "View Code" from the dropdown list.
This code applies only to the "Highlight" worksheet - if you want this feature to be available for another worksheet you must copy the code into the VBA CodeModule for that worksheet.
Hope this helps - please let me know how you get on.
Regards,
Greg M
Hi again,
Many thanks for your private message.
You're very welcome - glad I was able to help.
Regards,
Greg M
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks