Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Numbering columns in autofilter

Posted on 2013-01-20
2
Medium Priority
?
193 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

963 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