View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bud Bud is offline
external usenet poster
 
Posts: 61
Default How to Filter a column & Indent all but the 1st header record

Hello

I am filtering on column 1 6 times and than indenting column 3 a specific
number of times depending on the criteria in column 1. Ex. If the criteria is
1 than I indent 2 times and ifthe criteria is I indent 4 times.

I have supplied the code I am using below. It works fine except for
indenting row 1 all the time.

The issue is that I don't want row 1 ever indented and the way I have the
code it is getting indented.

How can I use the attached code and just not select row 1 on the
indent.....as I want all rows it filtered to be indented except row 1.

Thanks

'Filter on Column 1 the Outline level field and Indent Column 3 Task name
Selection.AutoFilter Field:=1, Criteria1:="2"
Range("C:C").Select
Selection.InsertIndent 1
Selection.InsertIndent 1
Selection.InsertIndent 1
Selection.InsertIndent 1
Selection.AutoFilter Field:=1, Criteria1:="3"
Range("C:C").Select
Selection.InsertIndent 1
Selection.InsertIndent 1
Selection.InsertIndent 1
Selection.InsertIndent 1
Selection.InsertIndent 1
Selection.InsertIndent 1