+ Reply to Thread
Results 1 to 2 of 2

Using relative cell locations to copy in loop?

  1. #1
    Registered User
    Join Date
    11-09-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    52

    Using relative cell locations to copy in loop?

    In reference to this thread I am trying to sort groups of rows based on a single cell in each group.

    I am going to try a brute force approach and run a loop that looks for the search criteria and copies this into a newly created first column for each of the rows in the group. I can then sort the groups using the first column.

    The cell I am looking for is in column F of every row that contains "C" in column B. I need to take this value, copy it, then paste it to column A for the 4 rows that comprise the group. The rows are the two rows above the row with "C", the same row as the row with "C", and the row below the row with "C".

    For example, I would need this code to find a value present in F3 and copy that value to A1:A4. I believe I would need to do this in relative terms as I am using a loop.

    I have attached a worksheet that manually shows what I am starting with and what I want to acheive (one worksheet for each). Please keep in mind that the attached workbook is just for illustration and shows only two groups of data points; this would need to loop through any number of data points.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mpkavanagh; 02-16-2011 at 07:02 PM.

  2. #2
    Registered User
    Join Date
    11-09-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Using relative cell locations to copy in loop?

    Got it.

    Please Login or Register  to view this content.

+ 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