Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to copy then entire row from WS "raw_copy" to "RC_new" if the
text in column E contains a substring of "Alarms" I was hoping this code would do it ... compiler error Do I have a syntax problem or a logic problem THXs Worksheets("Raw_copy").Range("E1:E" & g_var1).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Worksheets("RC_New").Range( _ "A1"), Unique:=False, CriteriaRange:=Range("Alarms") |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is a macro that will look in column a and extract all
unique items to column F. Adapt to suit Sub makeuniquelist() Application.ScreenUpdating = False mc = "a" lr = Cells(Rows.Count, mc).End(xlUp).Row With Range("A1:A" & lr) .AdvancedFilter Action:=xlFilterInPlace, Unique:=True .Copy Range("F1") Application.CutCopyMode = False ActiveSheet.ShowAllData End With Application.ScreenUpdating = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "miek" wrote in message ... I want to copy then entire row from WS "raw_copy" to "RC_new" if the text in column E contains a substring of "Alarms" I was hoping this code would do it ... compiler error Do I have a syntax problem or a logic problem THXs Worksheets("Raw_copy").Range("E1:E" & g_var1).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Worksheets("RC_New").Range( _ "A1"), Unique:=False, CriteriaRange:=Range("Alarms") |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not really looking for only "unique" values, per se.
colE alarm txt1 alarm txt2 alarm txt3 text1 If colE has the substring of "alarm" I would like to copy/paste to WS "RC_New" I was thinking the advancedfilter with CriteriaRange:=Range("Alarms") would get this for me Is this correct? "Don Guillett" wrote: This is a macro that will look in column a and extract all unique items to column F. Adapt to suit Sub makeuniquelist() Application.ScreenUpdating = False mc = "a" lr = Cells(Rows.Count, mc).End(xlUp).Row With Range("A1:A" & lr) .AdvancedFilter Action:=xlFilterInPlace, Unique:=True .Copy Range("F1") Application.CutCopyMode = False ActiveSheet.ShowAllData End With Application.ScreenUpdating = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "miek" wrote in message ... I want to copy then entire row from WS "raw_copy" to "RC_new" if the text in column E contains a substring of "Alarms" I was hoping this code would do it ... compiler error Do I have a syntax problem or a logic problem THXs Worksheets("Raw_copy").Range("E1:E" & g_var1).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Worksheets("RC_New").Range( _ "A1"), Unique:=False, CriteriaRange:=Range("Alarms") |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are missing a line continuation (_) at the end of the 1st line
Worksheets("Raw_copy").Range("E1:E" & g_var1).AdvancedFilter _ Action:=xlFilterCopy, _ CopyToRange:=Worksheets("RC_New").Range("A1"), _ Unique:=False, _ CriteriaRange:=Range("Alarms") "miek" wrote: I want to copy then entire row from WS "raw_copy" to "RC_new" if the text in column E contains a substring of "Alarms" I was hoping this code would do it ... compiler error Do I have a syntax problem or a logic problem THXs Worksheets("Raw_copy").Range("E1:E" & g_var1).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Worksheets("RC_New").Range( _ "A1"), Unique:=False, CriteriaRange:=Range("Alarms") |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The missing continuation char "_" was in my code, I jsut had a copy and paste
problem. I get a runtime 1004 error Does the worksheet advancedfilter function look for a set text string critera? "Joel" wrote: You are missing a line continuation (_) at the end of the 1st line Worksheets("Raw_copy").Range("E1:E" & g_var1).AdvancedFilter _ Action:=xlFilterCopy, _ CopyToRange:=Worksheets("RC_New").Range("A1"), _ Unique:=False, _ CriteriaRange:=Range("Alarms") "miek" wrote: I want to copy then entire row from WS "raw_copy" to "RC_new" if the text in column E contains a substring of "Alarms" I was hoping this code would do it ... compiler error Do I have a syntax problem or a logic problem THXs Worksheets("Raw_copy").Range("E1:E" & g_var1).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Worksheets("RC_New").Range( _ "A1"), Unique:=False, CriteriaRange:=Range("Alarms") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy is criteria met | Excel Worksheet Functions | |||
Copy is criteria met | Excel Worksheet Functions | |||
Copy is criteria met | Excel Worksheet Functions | |||
Copy with criteria | Excel Programming | |||
Copy with criteria | Excel Programming |