I need some help with some code. See Attached link to work book. I have added buttons to the worksheet so you can run the code and see what it does.
The actual data is downloaded from a database using a file transfer program, so the number of rows varies all the time.
What I am trying to accomplish is filter column B by color lets say yellow then filter column C to show all cells with no color.
Then fill in the row color of Yellow in column C if column C is does not already have a color of Light Blue.
Which filtering column C to show only cells with no color should remove any that have a cell color of light blue.
The code repeats to then do the rose color.
In the example I have provided after running the code, Cell C11 should be yellow and cell C16 should be rose color.
My problem is if you push the button the several times it will highlight cell C1 in the header which can never happen. Also it highlights all empty cells below the last row of data which can never happen.
Is there an easier way of doing this?? Or can someone help me modify the code I already have.
Link To Work Book
The actual data is downloaded from a database using a file transfer program, so the number of rows varies all the time.
What I am trying to accomplish is filter column B by color lets say yellow then filter column C to show all cells with no color.
Then fill in the row color of Yellow in column C if column C is does not already have a color of Light Blue.
Which filtering column C to show only cells with no color should remove any that have a cell color of light blue.
The code repeats to then do the rose color.
In the example I have provided after running the code, Cell C11 should be yellow and cell C16 should be rose color.
My problem is if you push the button the several times it will highlight cell C1 in the header which can never happen. Also it highlights all empty cells below the last row of data which can never happen.
Is there an easier way of doing this?? Or can someone help me modify the code I already have.
Link To Work Book