Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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.





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
VBA - Selection Instead of Range Cue Excel Discussion (Misc queries) 2 January 15th 10 05:08 PM
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
Range Selection cfspahn24 Excel Discussion (Misc queries) 3 April 14th 06 01:29 PM
Selection Range ch Excel Discussion (Misc queries) 5 July 15th 05 05:50 AM


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

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"