Can a Macro be created that will extract the entire row for a sheet where ever a cell is coloured red to a new sheet.
Can a Macro be created that will extract the entire row for a sheet where ever a cell is coloured red to a new sheet.
Yes
but you need to say if it is any cell in the row that is red, or is it just in certain columns. The macro will run much quicker if you can be more specific about the range to search.
Also is the shading the result of conditional formating, or is just shading the cells?
Regards
Dav
Hi,
Sorry for not being specific. Well the red colour will be on a cell which is a result of conditional formatting and I want to extract the entire row from the data where the cell is marked red due to conditional formatting to a new work sheet.
Thanks a ton in advance.
Cheers,
Rahul
You still have not said if the cells are all in one column or the whole sheet?
Also the conditional format, is it a similar formula in each cell, becasue if it is, it is easier to select the cells on the evaluation of the formula, rather than if the cells are red.
http://www.vbaexpress.com/kb/getarticle.php?kb_id=190
will give you some code to get the color of the cells
can you post the sheet of a sample of it to show what you want to achieve
Regards
Dav
Dear Dav,
Pls find the file enclosed for which I need the macro. My aim is that after running the macro where ever the cells have been highlighted due to conditional formatting that particular row gets copied to a new sheet. So at the end I will have a new sheet with all the rows where conditional formatting has taken place.
Well conditional formating is a bit of a pain to do in macros, but as far as I can see you are only concerned if each pair of columns are not equal. And it is coloured green and not red!
The attached should work. It just compares the values
Regards
Dav
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks