+ Reply to Thread
Results 1 to 4 of 4

Selecting Correct Data from file

  1. #1
    Registered User
    Join Date
    10-30-2018
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    30

    Selecting Correct Data from file

    Dear All,

    Please see my file attached.
    I have a file with below columns.
    A = Product name
    B = Stocklevel
    C= Price
    D= CAtegorie 1
    E= Categorie 2
    F = Categorie 3

    Problem now is that the data from categorie 1,2 and 3 are mixed up
    And I want to get out of these 3 colums all the data I need which is the data I have in the list data.
    So basically a formula should look in column D, is there a match with a field in tab data, this should be shown. Is there no match, look in column E, no match, look in colum F.
    Does something like this exist?

    Thanks for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Selecting Correct Data from file

    I'm guessing you want to populate the File!H column with the information. Is that right?

    I'm not sure how you want to populate that field. What I have so far is, if the name in col-D matches a name in Data!A:A then I put "Cat-1" in File col-H. If there is no match with col-D then I try col-E. If that results in a match then I put "Cat-2" in File col-H. Same process for col-F. If there's no match in any of the three columns then I put "Not found" in col-A. See the following picture..

    simpauw.png

    Formula in H2 and copied down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Is this on the right track?

    By the way, why two identical columns on the Data worksheet?

  3. #3
    Registered User
    Join Date
    10-30-2018
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Selecting Correct Data from file

    Dear Geoff,

    Thanks for your help! This indeed was close. Only instead of returning the Categorie number the return field should show the corresponding field. So if D2 matches with the list it should show D2.

    Made the adjustmend and we are running!

    =IF(NOT(ISNA(VLOOKUP(D2 Data!A:A; 1; FALSE)));D2;IF(NOT(ISNA(VLOOKUP(E2;Data!A:A;1;FALSE)));E2;IF(NOT(ISNA(VLOOKUP(F2;Data!A:A;1;FALSE)));F2;"Not found")))

    Thanks for your help!

  4. #4
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Selecting Correct Data from file

    Glad to help and thanks for the feedback

+ 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. Amibroker chart not showing correct data from csv file
    By Shahadat65 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2016, 06:43 PM
  2. Replies: 4
    Last Post: 01-06-2016, 05:38 PM
  3. Trouble selecting correct data for bubble charts.
    By Mc837 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-07-2014, 04:57 PM
  4. Selecting the Correct Formula
    By vincywoman1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-11-2014, 01:40 AM
  5. [SOLVED] Problems selecting correct data after filter is in place
    By DarthWire in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2013, 06:18 AM
  6. ADOdb not selecting correct data within Date Range
    By mvgoggans in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2012, 03:50 PM
  7. Combobox on Userform not selecting correct data
    By frostie77 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2010, 05:15 PM

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