Numbering columns in autofilter

Posted on 2013-01-20
Last Modified: 2013-01-20
Guys, Please see the attached file;

Is it possible to number rows with a formula that takes into consideration a file is in autofilter and not in autofilter?

Thank you for your help,
Question by:rws1
LVL 43

Accepted Solution

Saqib Husain, Syed earned 500 total points
ID: 38798914

Private Sub ot_Click()
Application.Calculation = xlManual
    Selection.AutoFilter Field:=1, Criteria1:=1
    Selection.EntireRow.Hidden = True
    Application.Calculation = xlAutomatic
    With Sheet1.AutoFilter.Range.Offset(, -5).SpecialCells(xlCellTypeVisible)
        .Cells(1) = "=max(r1c:r[-1]c)+1"
        Debug.Print .Cells(1).Address
        .Offset(, 6).Cells(1).Select
    End With
End Sub

Author Comment

ID: 38799159
Works great, thank you very much

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now