Solved

Numbering columns in autofilter

Posted on 2013-01-20
2
185 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This collection of functions covers all the normal rounding methods of just about any numeric value.
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

739 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