Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using offset following an autofilter

I have used the autofilter on one column in my datasheet and i am trying to
select the cell to the right of the first cell in the filtered list.

The filter as it appears in code is:

Selection.AutoFilter field:=field, Criteria1:="<"

I have very little knowledge of VBA and cannot get the offset function to
work on this one. Can you tell me what the next line of code should be to
select the offset cell?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Using offset following an autofilter

For Each c In Selection
If Rows(c.Row).Hidden = False Then
If iCt = 0 Then
iCt = 1
Else
c.Offset(0, 1).Select
Exit For
End If
End If
Next c

Add this after what you have. Using iCt avoids the header row.

Hth,
Merjet



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using offset following an autofilter

That worked a treat.

Cheers Merjet.

Do you know of any good online excel vba training?

"merjet" wrote:

For Each c In Selection
If Rows(c.Row).Hidden = False Then
If iCt = 0 Then
iCt = 1
Else
c.Offset(0, 1).Select
Exit For
End If
End If
Next c

Add this after what you have. Using iCt avoids the header row.

Hth,
Merjet




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Using offset following an autofilter

Do a Google search for: excel vba tutorial online

You will find plenty. I can't say how good any of them are from
personal experience.

Hth,
Merjet


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
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 10:05 PM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Find, Copy offset to offset on other sheet, Run-time 1004. Finny[_3_] Excel Programming 10 December 7th 06 11:46 PM
Chart / Scrollbar / Offset / Autofilter Oliver Charts and Charting in Excel 0 September 19th 06 03:47 AM
Using Offset with Autofilter data Moiz Excel Programming 1 October 2nd 05 10:45 AM


All times are GMT +1. The time now is 06:22 PM.

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

About Us

"It's about Microsoft Excel"