I'm relatively new to VBA coding and would like some help to separate data.
I have an Excel file containing data that are colour coded in ranges.
i.e. Cell B2:B10 Red, Cell B11:B20 Blue, Cell B30:31 Red. Cells In between these ranges are not coloured. I would like to separate these data and put them in a separate worksheet. So, I'll need to loop across the column, and select the first range that is coloured Red. Then copy those value into a new sheet. Then move on to the next colour (blue), and then copy it into another sheet. Then move on to the next colour (red), and copy it into another sheet.
May I know how to even find a code that can help to select the ranges that are coloured (interior colour)?
The reason I'm asking for the range is that the data that I require is not only in column B. Column C, D and there are other worksheets in the workbook too. But they all correspond to the rows that have been colour coded. But only column B has the colour codes.
i.e. Cell B10:B20, C10:C20, E10:E20 are of the same batch, only that columns B,C and E measures different parameters.
From the photo, each alternate colour is one batch. And I would like to separate them according to the batch. Not by colour.
Sorry, this is my first post and I didn't know cross-posting would be an issue. I'm just stuck as to how I can cycle through the columns by using the colour of the cells. My apologies if I've broken a rule.
I've asked the same question on stackoverflow.
Attachment 701714
Bookmarks