Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I need to do a loop, that looks at keywords and then acording to them copies the data to another sheet. The table is something like that: Keyword Text Value Value key1 dog 1 3 key1 cat 3 4 key2 cow 9 8 key3 fox 44 5 So, the loop should look at the keywords, and then copy the data to aother range (every keyword has it's own range). Thanks to everyone who takes the time to reply. Juuljus |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Got that. Used Advanced Filter.
If anyone has a better idea, then would be nice so read it. Juuljus |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The following snippet might be helpful <snip 'move each keyword data to own sheet Sheets.Add.Name = "keyword1" Sheets.Add.Name = "keyword2" Sheets.Add.Name = "keyword3" '------- For Each WS In Worksheets(Array("keyword1", "keyword2", "keyword3")) WS.Range("A1:G1").Value = Sheets("Print").Range("A1:G1").Value 'copy title row to each new page Next '------- Sheets("inputdata").Activate For Each cell In Range("G1:G" & Range("G65536").End(xlUp).Row) 'your keyword column Select Case cell.Value Case "keyword1": cell.EntireRow.Cut Sheets("keyword1t").Range("A65536").End(xlUp).Offs et(1, 0) Case "keyword2": cell.EntireRow.Cut Sheets("keyword2").Range("A65536").End(xlUp).Offse t(1, 0) Case "keyword3": cell.EntireRow.Cut Sheets("keyword3").Range("A65536").End(xlUp).Offse t(1, 0) End Select Next <end snip "Juuljus" wrote in message oups.com... Hello, I need to do a loop, that looks at keywords and then acording to them copies the data to another sheet. The table is something like that: Keyword Text Value Value key1 dog 1 3 key1 cat 3 4 key2 cow 9 8 key3 fox 44 5 So, the loop should look at the keywords, and then copy the data to aother range (every keyword has it's own range). Thanks to everyone who takes the time to reply. Juuljus |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looping through my worksheet and copying cells | Excel Programming | |||
looping and copying from onesheet to othersheet | Excel Programming | |||
Looping down list and each time copying to another worksheet | Excel Programming | |||
Looping down list and each time copying to another worksheet | Excel Programming | |||
Nested Looping with Tests, Row Copying Macro | Excel Programming |