Multiple sheets sharing variable data

  • Thread starter Thread starter x65140
  • Start date Start date
X

x65140

Sheet1, Column A contains variable data entered. (Red, Blue, Green
Blue, Green, Red, Green Red, Blue)

When the data is entered into Sheet1, I want it to appear in Sheet2 as
Column A (Red, Red, Red), Column B (Blue, Blue, Blue), Column
(Green, Green, Green)

Any ideas
 
Hi!

I recorded this simple macro:

Sub SplitColours()
'
' SplitColours Macro
' Macro recorded 29/06/2004
' Keyboard Shortcut: Ctrl+Shift+S
'
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="Blue"
Range("A2:A100").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("Sheet2").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Selection.AutoFilter Field:=1, Criteria1:="Red"
Range("A2:A100").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Selection.AutoFilter Field:=1, Criteria1:="Green"
Range("A2:A100").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("C2").Select
ActiveSheet.Paste
End Sub

All it does is us Data > Filter > AutoFilter to select the "Red" o
whatever. Copy visible cells. Paste them into the relevant column.

Not the most elegant thing, but a quick fix which works?

Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top