View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] smitha12@gmail.com is offline
external usenet poster
 
Posts: 1
Default first Autofiltering, then subtotal one column, copy value to first row and delete rest

Hey I have a question..I am totally new to excel programming and this
is what I want to do..

1. I want to first autofilter bsaed on criteria
2. Subtotal all the values visible in Column 7 and copy them to first
visible row after filtering
3. delete rest of the rows (after first one).

All I have gotten done is: filtering right now
Selection.AutoFilter Field:=3, Criteria1:=FilterCriteria
ActiveSheet.AutoFilter.Range.Offset(1, 6).Select
Selection.Subtotal GroupBy:=7, Function:=xlSum,
TotalList:=Array(7), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True **This
doesnt work***

If I try to loop to visible cells by using offset(1,0) that acutally
takes me to non-filtered cells.

Any helps is appreciated.

Thanks much.