Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default selecting a range

On Wednesday, March 14, 2012 7:15:26 AM UTC-5, wrote:
i have a program that scrools across column headers that are in row
10. when it finds the header that = the variable thats already been
gained from a list box i want the code to stop moving across and
select the current column and the next five columns along and also the
below 15 rows. once selected i am trying to copy it somewhere else.

Just cannot seem to get the data selected

any help greatly recieved

John



Sub findtextinrow10andselectrangeSAS()
Set mf = Rows(10).Find(What:="yourtexthere", _
LookIn:=xlValues, LookAt:=xlWhole, _
SearchOrder:=xlByColumns, SearchDirection:=xlNext)

If Not mf Is Nothing Then mf.Resize(16, 6).copy range("h10")
End Sub

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
Proper syntax for selecting a range using cells instead of range JasonK[_3_] Excel Programming 4 July 22nd 09 07:01 AM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Help please in selecting range dependent on another range MickJJ Excel Programming 2 January 10th 05 12:01 PM
Selecting a Range inside a range hcova Excel Programming 0 July 13th 04 03:26 PM
selecting a range David Excel Programming 2 July 21st 03 11:14 PM


All times are GMT +1. The time now is 05:59 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"