0

I am trying to copy rows based on color (which is listed in one of the columns) and paste that data into a worksheet named that specific color (ex: copy all data that is blue and paste it into a worksheet called Blue). I already have a macro that creates all the accompanying worksheets, I just can't figure out how to copy and paste rows based on the values in one column to the matching worksheet.

There are multiple rows for each color.

urdearboy
  • 14,439
  • 5
  • 28
  • 58
Brian
  • 39
  • 4
  • Create a variable that stores the color you are looking at currently. Then filter your range (color column) for by that variable, then use that variable to locate the sheet. – urdearboy Feb 28 '20 at 20:29

1 Answers1

0

Since you shared no code I will give you a high-level overview of a potential approach along with examples that you can use to


  1. Create a variable to store the color you are looking for. Ex: iColor = "Red"
  2. Then filter your color column by iColor and then copy the visible cells. EXAMPLE
  3. You can then locate the sheet (assuming it has the same name as iColor) with this: ThisWorkbook.Sheets(iColor).Range("A1").Paste
urdearboy
  • 14,439
  • 5
  • 28
  • 58