+ Reply to Thread
Results 1 to 2 of 2

Selecting a "found" range

  1. #1
    Registered User
    Join Date
    09-22-2004
    Posts
    35

    Selecting a "found" range

    I have a loop that looks through a large column of data. When the loop finds specific data I need it to copy this row and the next row for six columns, and then paste it to another point on the page. I know how to code copy and paste but I'm not quite sure how to select the appropriate range without specifying which cells. For example, I need to select "A1:B:6" if A1 contains the data I'm looking for, or "C1:D6", if C1 contains the data I'm looking for. Can anyone help? Thanks.

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187
    try
    selection.resize(6,2).select

    or use a range object for cleaner coding

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1