SkysLastChance 21 Posted July 25 Share Posted July 25 (edited) $oExcel.ActiveSheet.AutoFilter.Range.Rows.Columns(30).SpecialCells($xlCellTypeVisible).Interior.ColorIndex = 37 $oExcel.ActiveSheet.AutoFilter.Range.Rows.Columns(30).SpecialCells($xlCellTypeVisible).Value = 0 I have a script that is filtering a range of data using the code above. I am using this to highlight and change the value to 0 in column 30 (AD) (Filtred Data Only) However, I don't want to include the header. What would be the a good/clean way to exclude the header row? Otherwise, I am just planning to re-fill in the header row in with _Excel_Rangewrite. Edited July 25 by SkysLastChance Spelling Life's simple. You make choices and you don't look back. Link to post Share on other sites
Solution SkysLastChance 21 Posted July 25 Author Solution Share Posted July 25 (edited) Local $xlup = -4162 $LastRow = $oWorkbook.ActiveSheet.Range("A1000000").End($xlup).Row $oExcel.ActiveSheet.AutoFilter.Range.Rows("2:" & $LastRow).Columns(30).SpecialCells($xlCellTypeVisible).Interior.ColorIndex = 37 $oExcel.ActiveSheet.AutoFilter.Range.Rows("2:" & $LastRow).Columns(30).SpecialCells($xlCellTypeVisible).Value = 0 This seemed to do the trick. Edited July 25 by SkysLastChance Life's simple. You make choices and you don't look back. Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now