Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CmK CmK is offline
external usenet poster
 
Posts: 69
Default SELECT THE FIRST CELL IN ADVANCE FILTERed worksheet vba code

Hi I need to know how to select the first cell or row in the advanced
filtered worksheet

Eg Ctrl + home

thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default SELECT THE FIRST CELL IN ADVANCE FILTERed worksheet vba code

Hi CmK,

'--------------
Hi I need to know how to select the first cell or row in the advanced
filtered worksheet

Eg Ctrl + home
'--------------

I am not aware of a standard shortcut key but
perhaps you could assign something like the
following code to your own shortcut keys:

'=============
Public Sub Tester()
Dim destSH As Worksheet
Dim Rng As Range
Dim Rng2 As Range
Dim Rng3 As Range

Set Rng = Range(ActiveSheet.Name _
& "!_FilterDatabase")

If Rng Is Nothing Then
Exit Sub
End If

Set destSH = ThisWorkbook.Sheets("Sheet2") '<<=== CHANGE

With destSH
On Error Resume Next
Set Rng2 = .Range(.Name & "!Extract")
On Error GoTo 0
End With

If Not Rng2 Is Nothing Then
Application.Goto Rng2.Cells(2, 1)
Else
With Rng
Set Rng = .Offset(1).Resize(.Rows.Count - 1)
End With
On Error Resume Next
Set Rng3 = Rng.SpecialCells(xlVisible)
On Error GoTo 0

If Not Rng3 Is Nothing Then
Rng3.Cells(1).Select
Else
Rng.Cells(1).Offset(-1).Select
End If
End If
End Sub
'<<=============


---
Regards,
Norman


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default SELECT THE FIRST CELL IN ADVANCE FILTERed worksheet vba code

ctrl +left arrow to goto col A
ctrl+UP arrow to goto first filtered.

--
Don Guillett
SalesAid Software

"CmK" wrote in message
...
Hi I need to know how to select the first cell or row in the advanced
filtered worksheet

Eg Ctrl + home

thanks in advance


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Randomly Select cell from filtered list Matt Ferguson Excel Worksheet Functions 1 November 26th 09 02:12 AM
Return filtered values into report worksheet based on filtered valueon the data worksheet dicko1 Excel Worksheet Functions 1 April 21st 09 12:27 AM
How do I select the first cell of a filtered list? Shane Moore Excel Worksheet Functions 2 August 15th 06 02:18 PM
VBa code to select from worksheet mike Excel Programming 2 March 31st 06 12:46 AM
VB select code for a worksheet Vicki Excel Programming 3 December 8th 05 09:43 PM


All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"