Solved

Numbering columns in autofilter

Posted on 2013-01-20
2
184 Views
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,
Robert
next-row.xlsm
0
Comment
Question by:rws1
2 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 38798914
Try

Private Sub ot_Click()
Application.Calculation = xlManual
    Range("H4:H40").Select
    Selection.AutoFilter
    Selection.AutoFilter Field:=1, Criteria1:=1
    Rows("4:4").Select
    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
        .FillDown
        .Offset(, 6).Cells(1).Select
    End With
End Sub
0
 

Author Comment

by:rws1
ID: 38799159
Works great, thank you very much
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 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