![]() |
Selection of range
Hello All,
The following is the arrangement of a row. 25,26,27,28,29,30,25,26,27,28,29,30 The arrangement changes to 25,26,28,30,25,27,30 ( not on proper sereis) when I refresh the data. I would like to select the'range' from 25 to 30 always(first sereis only).Is automatic selection of a range possible based on the above or similar condition. |
Selection of range
This is rude and crude. And it is set for row 1
=========================================== Dim ad As String Range("A1").Select ad = Cells.Find(What:="30", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False) _ .Address ad = "A1: " & ad Range(ad).Select ======================================= This one might work for a row defined by a variable Dim ad As String, r as Long r = ??? ' need to define r Cells(r,1).Select ad = Rows(r).Find(What:="30", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False) _ .Address ad = "A1: " & ad Range(ad).Select ========================= -- sb "me" wrote in message ... Hello All, The following is the arrangement of a row. 25,26,27,28,29,30,25,26,27,28,29,30 The arrangement changes to 25,26,28,30,25,27,30 ( not on proper sereis) when I refresh the data. I would like to select the'range' from 25 to 30 always(first sereis only).Is automatic selection of a range possible based on the above or similar condition. |
All times are GMT +1. The time now is 10:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com