Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Don Don is offline
external usenet poster
 
Posts: 487
Default How to look up and copy a changing range of data ?

How can I lookup and copy a section of data in a worksheet where the data row
changes from one day to the next (ie. fom a150..z300 to a250..z400) ?

In worksheet 1 in column D I need to find a name "Birmingham" and from that
row move to column A, select the range of data (a250..z400), copy, and paste
into workrksheet 2.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to look up and copy a changing range of data ?

Your source data is assumed in Sheet1 as described,
where col D = key lookup values, eg: Birmingham

In Sheet2,
The lookup value of interest is input in A2, eg: Birmingham
Put in B2:
=OFFSET(INDIRECT("'Sheet1'!A"&MATCH($A$2,Sheet1!$D :$D,0)),ROWS($1:1)-1,COLUMNS($A:A)-1)
Copy B2 across by 26 cols, fill down by 150 rows to return the desired range*
*size is based on your "a250:z400" ie 26 cols x 150 rows
Success? hit the YES below
--
Max
Singapore
---
"Don" wrote:
How can I lookup and copy a section of data in a worksheet where the data row
changes from one day to the next (ie. fom a150..z300 to a250..z400) ?

In worksheet 1 in column D I need to find a name "Birmingham" and from that
row move to column A, select the range of data (a250..z400), copy, and paste
into worksheet 2.

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,522
Default How to look up and copy a changing range of data ?

try this idea

Sub FindTextCopyBlock()
Set mf = Columns("D").Find(What:="Birmingham", _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder _
:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)

If Not mf Is Nothing Then
Range(Cells(mf.Row, "a"), Cells(mf.Row + 150, "z")).Copy _
Sheets("sheet16").Cells(Rows.Count, 1).End(xlUp)(1)
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don" wrote in message
...
How can I lookup and copy a section of data in a worksheet where the data
row
changes from one day to the next (ie. fom a150..z300 to a250..z400) ?

In worksheet 1 in column D I need to find a name "Birmingham" and from
that
row move to column A, select the range of data (a250..z400), copy, and
paste
into workrksheet 2.


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
How do I copy a vlookup formula without changing the data range? VickyL872 Excel Worksheet Functions 2 May 27th 08 06:45 PM
range of Formula copy but not changing the content aw Excel Discussion (Misc queries) 4 November 20th 07 05:00 AM
How to copy range without changing formulas? [email protected] Excel Discussion (Misc queries) 3 December 31st 06 10:01 PM
Copy formula into multiple cells without changing range frankjh19701 Excel Worksheet Functions 4 December 28th 06 03:45 PM
How do you copy RANK w/o it changing the range? jspan Excel Worksheet Functions 1 June 21st 05 02:56 AM


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