+ Reply to Thread
Results 1 to 4 of 4

Rearranging datasets using vlookup

  1. #1
    Registered User
    Join Date
    01-22-2020
    Location
    Southampton, England
    MS-Off Ver
    2010
    Posts
    5

    Rearranging datasets using vlookup

    Hi,

    I have a problem where I have a live dataset going into a master spreadsheet, and I need this arranged differently in a new worksheet.

    Example Dataset:

    Data Stream Ref Code Stage
    First E29182 1
    First E28812 2
    First E21919 3
    Second E27327 2
    Second E23831 3
    Third E28233 1
    Third E28199 2


    I need this in a new worksheet/table sorted by stages as columns and data stream as rows, and to return the ref code as the value within the tab

    Example of what it should look like:

    Stage 1 Stage 2 Stage 3
    First E29182 E28812 E21919
    Second E27327 E23831
    Third E28233 E28199


    Been playing around with vlookups to return the cell value into the correct new column by stages, since this worksheet should be blank, not sure whether I need to hide a look up cell within the new table (eg. ref code) in order to return the value into the correct column so vlook up has a single cell to reference, rather than whole dataset.

    =IF(ISNA(VLOOKUP(VLOOKUP(ref code cell, dataset table, 1, false), dataset table="stage 1",1,FALSE)), "" , FALSE)

    Realise this formula is incorrect, but if anyone could help me out would be greatly appreciated.

    Cheers
    Last edited by lewini; 01-22-2020 at 06:05 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Rearranging datasets using vlookup

    It would be a lot easier for us if we could see examples of the data and how it is laid out. Please attach a sample workbook, as described in the yellow banner at the top of the screen.

    Pete

  3. #3
    Registered User
    Join Date
    01-22-2020
    Location
    Southampton, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Rearranging datasets using vlookup

    No worries,

    Cheers Pete
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Rearranging datasets using vlookup

    Perhaps this pivot table proposal will be helpful.
    A helper column (Ref#) is added to the master and populated using: =VALUE(RIGHT(B5,LEN(B5)-1))
    In the pivot table Data Stream is in the Row field, Stage is in the Column field and Ref# is in the Value field.
    Note that the number formatting for Ref# in the pivot table is "E"0
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to Clean up datasets
    By Tonk in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-06-2018, 04:13 PM
  2. [SOLVED] Rearranging VLOOKUP formula
    By Catsonheat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2017, 01:53 PM
  3. VLOOKUP + IF + OR with 4 conditions, using 2 datasets.
    By EndeHerc in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-07-2016, 06:24 AM
  4. [SOLVED] VLOOKUP + AND/IF with 3 conditions, using 2 datasets.
    By EndeHerc in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-05-2016, 10:58 AM
  5. Reformating Old Datasets
    By TheScott in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2015, 11:02 AM
  6. adjusting datasets
    By PaulALC in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-09-2014, 11:18 AM
  7. [SOLVED] Excel 2007 - vlookup/index/match with two datasets on two sheets
    By deevusone in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-23-2014, 04:47 PM

Tags for this Thread

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