Hi,
I'm trying to filter a list based on the fill colour of a cell.
From the sheet attached, I want to filter it sothat the RED fills appear at the top and then the striped fill. I want to start with the right most column (T), and then repeat for the next column (S). I wish to repeat this from every column from T all the way to D. This will mean that the column with red in Column D will be at the top, and then ones in Column E and so on.
I recorded the macro from filtering and got this (have changed activesheet to 'WS')
What I want to do is substitute
for
or
then I can increment the column by -1 for each loop.
I'm afraid my VBA skills are still very patchy and I haven't grasped how to do this, and looking at other posts has confused me further!
I'm sure there is a far more elegant solution to what I am trying to do, which I would be very much appreciative of, but I would also like to know how to achieve the above so that I can use the record macro as a base!
To give a fuller picture, I should stipulate that the last column will not always be Col.T, and the row lengths will vary, which is why I need to use variables. Also, The step before this is to search for a known word (OUTPUT), and then sort the table as described above. There are many of these tables, so that is another loop which I will be adding once I get this first part done!
The macro in the attached sheet is a 'Work in Progress', so please excuse!
Any help would be greatly appreciated!
J
Bookmarks