+ Reply to Thread
Results 1 to 8 of 8

Select Data from a cell, move down a number, select data

  1. #1
    Registered User
    Join Date
    10-12-2007
    Posts
    4

    Select Data from a cell, move down a number, select data

    Hi everyone,

    I have a file that has about 2500 lines in it. The data is grouped into sections. Out of each section I need only two pieces of info. The data is consistent from group to group. My coworker and myself thought if we could pick the cell we want and then from there add 6 to the cell number then it would get what we wanted, but I can't figure out how to tell Excel to add 6 to the cell number to move down through the list. Attached is a jpg of a sample of my data. I need the data for NAME and INPUT.

    Any hint and/or suggestions would be great.

    Thanks,

    Kage_
    Attached Images Attached Images
    Last edited by Kage_; 10-12-2007 at 12:39 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi kage,

    This is certainly possible to do, but how do you want the results laid out? For example, are you storing each section's NAME and INPUT values in columns C and D? Or in one column with two cells for each section (C1 & C2, C3 & C4, etc.)?

  3. #3
    Registered User
    Join Date
    10-12-2007
    Posts
    4
    Guess I should of mentioned that humm. I would like the data to be on a second sheet with the data for NAME in column A and the data for INPUT in column B. With each entry on a separate row.

    Kage_

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Amended,

    This was from post one request

    Try

    Please Login or Register  to view this content.
    Returns B11, B17 etc


    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    As VBANoob pointed out, the OFFSET function will do what you need. Amended based on your secondary sheet request..

    If Sheet1 holds your raw data, and you want results in Sheet2 starting in A2 & B2 (For Name and Input):

    A2 formula:
    =OFFSET(Sheet1!$B$12,(ROW(A1)-1)*6,0)

    B2 formula:
    =OFFSET(Sheet1!$B$14,(ROW(A1)-1)*6,0)

    Fill downward to capture B18/B20 in A3 and B3, then B24/B26 in A4 and B4, etc.

  6. #6
    Registered User
    Join Date
    10-12-2007
    Posts
    4
    I'm going to play with it a bit more after lunch. It might work if I can understand the syntax of what the function is doing.

    Kage_

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This part of formula returns 0 for line 1, 6 for line 2, 12 for line 3.

    So first cell will be B12 then B18 etc e.g looking 6 rows down

    (ROW(A1)-1)*6
    VBA Noob

  8. #8
    Registered User
    Join Date
    10-12-2007
    Posts
    4
    Wonderful! That works great!

+ 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