LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Auto Filter List

Don,

Thank you for your help!

How do you specify a header row in the Advance Filter. Because Row One
is the header row. When I run the macro from A2 in E2 Bldg 1 is listed
twice. How can the macro be modified so that the Advance Filter can
begin from A2 and not include Bldg 1 twice?

<BEGIN MACRO CODE

Sub MakeUniqueListAndCount_1()
'Make Unique List & Count

lr = Cells(Rows.Count, "A").End(xlUp).Row
Range("A2:A" & lr).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("E2"), Unique:=True
'create formulas
lr = Cells(Rows.Count, "E").End(xlUp).Row
For i = 1 To lr
Cells(i, "F").FormulaR1C1 = "=COUNTIF(C[-5],RC[-1])"
Next i
'move to new sheet
Cells(1, "E").Resize(lr, 2).Cut
Sheets.Add
ActiveSheet.Paste
End Sub

<END MACRO CODE

Thank for your help,
jfcby


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When I use Auto Filter the drop down list is blank CAF Excel Discussion (Misc queries) 0 September 17th 08 09:43 PM
Drop Down list to run Auto filter on another sheet Mitch4 Excel Discussion (Misc queries) 2 July 23rd 07 03:40 PM
Auto-filter. Cursor on first row in new list John[_129_] Excel Programming 3 February 19th 07 05:20 AM
Auto list/filter Scott Marcus Excel Discussion (Misc queries) 0 October 31st 06 05:23 PM
Auto Filter From List James Stephens Excel Programming 0 January 28th 04 08:31 PM


All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"