Solved

Hide by autofilter vba

Posted on 2013-01-20
7
258 Views
Last Modified: 2013-01-20
Guys, please see the attached file.

It is an overtime calculation spreadsheet. Overtime criteria is row "F". When the hide button is clicked and if a cell in row "F" = 0 the autofilter hides those rows. The hide action is triggered if info in row "H">0.
I would like the code to go to the top visible cell in row "I" after the hide button is clicked.
For the attached scenario when the hide button is clicked the code should go to "I8", not "I5", the actual top open cell.

Thank you in advance for the direction with this code.

Robert
next-row.xlsm
0
Comment
Question by:rws1
  • 3
  • 3
7 Comments
 
LVL 10

Expert Comment

by:Anthony Berenguel
ID: 38798700
Hi Robert,

See the attached spreadsheet for an example of how to do this. Let me know if you have questions.

Regards,

AB
next-row.xlsm
0
 

Author Comment

by:rws1
ID: 38798733
AB, thank you for your response, your code is great from the module activation.

I have 7 simialar filters, do I need to copy; Public Sub Select_Top_Visible_Cell() for each action;
such as
Public Sub Select_Top_Visible_Cell()
Public Sub Select_Top_Visible_Cell1()
Public Sub Select_Top_Visible_Cell2()
And so forth or do you see a common denominator for all 7 filters?

Thank you again for your help,
Robert
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38798743
You do not need a loop. Try

 Sheet1.AutoFilter.Range.Offset(, 1).SpecialCells(xlCellTypeVisible).Cells(1).Select
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:rws1
ID: 38798758
Thank you for your response, where would the code you sent be place in the editor?  

Sheet1.AutoFilter.Range.Offset(, 1).SpecialCells(xlCellTypeVisible).Cells(1).Select
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38798762
In place of the

.... I5 ...select

line
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 38798771
Here is the file with the line inserted
Copy-of-next-row.xlsm
0
 

Author Comment

by:rws1
ID: 38798791
ssaqibh, thank you it works great
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
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…
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…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

706 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

19 Experts available now in Live!

Get 1:1 Help Now