+ Reply to Thread
Results 1 to 4 of 4

Make data set continuous (Pics)

  1. #1
    Registered User
    Join Date
    05-06-2011
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Make data set continuous (Pics)

    Hello,

    I'm doing some data analysis and looking for a way to make one column of a data set increment by 1 while causing the other columns to copy existing data. It will make sense if you look at the picture attached or the spreadsheet attached. Anyone know how this can be done?

    Thanks!
    Shawn
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by levatus; 05-06-2011 at 05:31 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,486

    Re: Make data set continuous (Pics)

    =VLOOKUP(K2,$A$8:$C$10,2) for x
    =VLOOKUP(K2,$A$8:$C$10,3) for y

    and copy down


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    05-06-2011
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Make data set continuous (Pics)

    Wow! Amazing and efficient. It works, but I'm just wondering how? I want to understand it so I can use it on my own.

    From what I understand of VLookup, it matches a value in a block of numbers and then returns a specified value from a specified column.

    In this example, The value I'm searching for: "13" does not exist in the dataset, how does excel know know to return the column 2 value that is between 7 and 18?

    Thanks!
    Shawn

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,486

    Re: Make data set continuous (Pics)

    From the Excel Help for VLOOKUP:

    VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

    Note that, in the solution provided, the last parameter was omitted. And your data table is in ascending order ... which is lucky (and required) for this to work.

    The VLOOKUP function syntax has the following arguments (argument: A value that provides information to an action, an event, a method, a property, a function, or a procedure.):

    lookup_value Required. The value to search in the first column of the table or range. The lookup_value argument can be a value or a reference. If the value you supply for the lookup_value argument is smaller than the smallest value in the first column of the table_array argument, VLOOKUP returns the #N/A error value.
    table_array Required. The range of cells that contains the data. You can use a reference to a range (for example, A2:D8), or a range name. The values in the first column of table_array are the values searched by lookup_value. These values can be text, numbers, or logical values. Uppercase and lowercase text are equivalent.
    col_index_num Required. The column number in the table_array argument from which the matching value must be returned. A col_index_num argument of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on.
    If the col_index_num argument is:

    Less than 1, VLOOKUP returns the #VALUE! error value.
    Greater than the number of columns in table_array, VLOOKUP returns the #REF! error value.
    range_lookup Optional. A logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match:
    If range_lookup is either TRUE or is omitted, an exact or approximate match is returned. If an exact match is not found, the next largest value that is less than lookup_value is returned.
    Important If range_lookup is either TRUE or is omitted, the values in the first column of table_array must be placed in ascending sort order; otherwise, VLOOKUP might not return the correct value.

    For more information, see Sort data.

    If range_lookup is FALSE, the values in the first column of table_array do not need to be sorted.

    If the range_lookup argument is FALSE, VLOOKUP will find only an exact match. If there are two or more values in the first column of table_array that match the lookup_value, the first value found is used. If an exact match is not found, the error value #N/A is returned.


    Regards

+ 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