LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default using .resize or an offset


I'm looking to create a routine that opens up external worksheet an
finds a record based on criteria i have determined and then copy th
found range.

So far i have been able to create a routine that finds the value i wan
and then uses offset to point at the first cell in the range i want t
copy. see below

Set Dcell = sh1.Cells.find(sCode)

Dcell.Offset(4, 0).Select

I know want to be able to create a range that is based on how man
records are beneath dcell, e.g. dcell may contain data for 1997 and th
cell below it data for 1998 and so. Is there away to dynamically loo
down the range until a blank cell is found, thus declaring that as th
end of the range?

Do i need to use offset and countA OR resize Or a combination of both?

so far ive been trying following to no evail, thanks

cell1.Offset(1,0).Resize(1,5).copy _
destination:=cell.offset(0,1) -- not dynamic

Set dynRng = offset(dcell,0,0,CountA(dcell&:&dcell)

--
cereldin
-----------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...fo&userid=3206
View this thread: http://www.excelforum.com/showthread.php?threadid=53158

 
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
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Why Copy/Paste fails using Offset & Resize of myRange? [email protected] Excel Discussion (Misc queries) 3 November 21st 06 02:06 AM
I could NOT resize the axis title but excel allows me to resize gr Iwan Setiyono Ko Charts and Charting in Excel 4 June 6th 06 04:46 AM
RESIZE PROPERTY: is it possible to resize "up" and "to the left"? Myles[_57_] Excel Programming 1 March 22nd 06 04:57 AM
I could NOT resize the axis title but excel allows me to resize gr Iwan Setiyono Ko Charts and Charting in Excel 0 March 15th 06 10:34 AM


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