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: 413
Default Adapt an array routine or a better way?

I build an array of the instances of '£' when found in
col(6). An offset down of a couple of rows will mark
the start of a data 'page', whilst an offset up from the
next value held in the array, will mark the end of that
data 'page'.

Once the array is built, this code establishes the data
'page' to be transferred:

Set rng1 = Range(varr(i).Offset(1, -5), varr(i + 1) _
.Offset(-6, -5)).Resize(, 6)

This seems to work until I reach the last 'page' when
suddenly there is no '£' in col(6) to mark the next
'page'......because there isn't a next page, and so
no '£' to Offset back up from!

What there is however, consistently throughout the data,
is a '£' in col(5) which more accurately marks the end
of the data 'page'.

So might there be a more efficient way that does
(perhaps) something like this:

search down col(6) for a '£' & mark it as a 'page' start
then switch to col(5) in that same row
search down col(5) for a '£' & mark it as a 'page' end
etc

Would be grateful to know if arrays are the answer, and
for any help, please.

Regards.




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.500 / Virus Database: 298 - Release Date: 10/07/2003


 
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
Have Linked Data Labels Adapt for an Expanded Range [email protected] Charts and Charting in Excel 1 July 24th 09 10:49 PM
Several Pivot Tables: Change one filter and adapt it for the other Aloha08 Excel Discussion (Misc queries) 2 June 12th 09 02:49 AM
Help to adapt Formula syntax to work with Dynamic Named Ranges Sam via OfficeKB.com Excel Worksheet Functions 13 April 29th 05 12:36 AM
adapt macro monty Excel Worksheet Functions 3 March 9th 05 12:44 PM
How can I adapt the included filter example to search for more th. Cheryl Excel Discussion (Misc queries) 0 February 24th 05 08:29 PM


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