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? |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com