Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Alright here is a stumper for me, hopefully you guys can help. What i have is
a list of lamptypes and how many they are per light fixture. Then i want to sum all of them to a summary column. I have the columns with sumif's to add only the particular lamptype chosen. What i am trying to do is use the advancefilter in a macro. What i want is when i get done with my huge list of lamptypes is have the macro pick up all the unique types and display them in a list. The problem that is occuring is that the first lamp always repeats itself for some reason. Here is the VB Macro script: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 12/14/2005 by Andrew Slater ' ' Keyboard Shortcut: Ctrl+Shift+L ' Range("LAMPTYPE").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ "AB5"), Unique:=True End Sub I can also send you a copy of the spreadsheet if you can really help me. Just attach an email with your post. Andy |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Add a header to your list. Advanced filter is picking up the first entry in
your data as the header--not as a real value. Andy wrote: Alright here is a stumper for me, hopefully you guys can help. What i have is a list of lamptypes and how many they are per light fixture. Then i want to sum all of them to a summary column. I have the columns with sumif's to add only the particular lamptype chosen. What i am trying to do is use the advancefilter in a macro. What i want is when i get done with my huge list of lamptypes is have the macro pick up all the unique types and display them in a list. The problem that is occuring is that the first lamp always repeats itself for some reason. Here is the VB Macro script: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 12/14/2005 by Andrew Slater ' ' Keyboard Shortcut: Ctrl+Shift+L ' Range("LAMPTYPE").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ "AB5"), Unique:=True End Sub I can also send you a copy of the spreadsheet if you can really help me. Just attach an email with your post. Andy -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is it possible that there is a spelling discrepancy or a trailing or leading
space for one of the two values? After you extract them, try something like =AB5=AB6 (or whatever cells the two repeated values are in). If it comes back false, Excel is not recognizing them as the same thing. For what's it's worth, your macro worked fine on the dummy data I created. -- tj "Andy" wrote: Alright here is a stumper for me, hopefully you guys can help. What i have is a list of lamptypes and how many they are per light fixture. Then i want to sum all of them to a summary column. I have the columns with sumif's to add only the particular lamptype chosen. What i am trying to do is use the advancefilter in a macro. What i want is when i get done with my huge list of lamptypes is have the macro pick up all the unique types and display them in a list. The problem that is occuring is that the first lamp always repeats itself for some reason. Here is the VB Macro script: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 12/14/2005 by Andrew Slater ' ' Keyboard Shortcut: Ctrl+Shift+L ' Range("LAMPTYPE").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ "AB5"), Unique:=True End Sub I can also send you a copy of the spreadsheet if you can really help me. Just attach an email with your post. Andy |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try deleting the entire extract range and then run the macro again. If that
doesn't work, please describe the layout and the steps more thoroughly. -- tj "Andy" wrote: Thanks guys, it makes sense but now i am getting a error that says "The extract range has a missing or illegal field name" "tjtjjtjt" wrote: One more thought. If your Named Range does not include a Column Heading, Excel is reading the top value in the list as a column heading. So it's not exactly repeating - it's showing up as the Column Header and as an item in the column. -- tj "Andy" wrote: Alright here is a stumper for me, hopefully you guys can help. What i have is a list of lamptypes and how many they are per light fixture. Then i want to sum all of them to a summary column. I have the columns with sumif's to add only the particular lamptype chosen. What i am trying to do is use the advancefilter in a macro. What i want is when i get done with my huge list of lamptypes is have the macro pick up all the unique types and display them in a list. The problem that is occuring is that the first lamp always repeats itself for some reason. Here is the VB Macro script: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 12/14/2005 by Andrew Slater ' ' Keyboard Shortcut: Ctrl+Shift+L ' Range("LAMPTYPE").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ "AB5"), Unique:=True End Sub I can also send you a copy of the spreadsheet if you can really help me. Just attach an email with your post. Andy |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks guys, it makes sense but now i am getting a error that says "The
extract range has a missing or illegal field name" "tjtjjtjt" wrote: One more thought. If your Named Range does not include a Column Heading, Excel is reading the top value in the list as a column heading. So it's not exactly repeating - it's showing up as the Column Header and as an item in the column. -- tj "Andy" wrote: Alright here is a stumper for me, hopefully you guys can help. What i have is a list of lamptypes and how many they are per light fixture. Then i want to sum all of them to a summary column. I have the columns with sumif's to add only the particular lamptype chosen. What i am trying to do is use the advancefilter in a macro. What i want is when i get done with my huge list of lamptypes is have the macro pick up all the unique types and display them in a list. The problem that is occuring is that the first lamp always repeats itself for some reason. Here is the VB Macro script: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 12/14/2005 by Andrew Slater ' ' Keyboard Shortcut: Ctrl+Shift+L ' Range("LAMPTYPE").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ "AB5"), Unique:=True End Sub I can also send you a copy of the spreadsheet if you can really help me. Just attach an email with your post. Andy |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One more thought. If your Named Range does not include a Column Heading,
Excel is reading the top value in the list as a column heading. So it's not exactly repeating - it's showing up as the Column Header and as an item in the column. -- tj "Andy" wrote: Alright here is a stumper for me, hopefully you guys can help. What i have is a list of lamptypes and how many they are per light fixture. Then i want to sum all of them to a summary column. I have the columns with sumif's to add only the particular lamptype chosen. What i am trying to do is use the advancefilter in a macro. What i want is when i get done with my huge list of lamptypes is have the macro pick up all the unique types and display them in a list. The problem that is occuring is that the first lamp always repeats itself for some reason. Here is the VB Macro script: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 12/14/2005 by Andrew Slater ' ' Keyboard Shortcut: Ctrl+Shift+L ' Range("LAMPTYPE").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ "AB5"), Unique:=True End Sub I can also send you a copy of the spreadsheet if you can really help me. Just attach an email with your post. Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Frozen panes in Excel should stay put when using autofilter. | Excel Discussion (Misc queries) | |||
How to format two repeating XML elements w/o getting list of list | Excel Discussion (Misc queries) | |||
Using AutoFilter with worksheet protection in 2000 vs. 2003 | Excel Discussion (Misc queries) | |||
Can I AutoFilter an entire workbook? | Excel Discussion (Misc queries) | |||
Strange Results with Autofilter | Excel Discussion (Misc queries) |