+ Reply to Thread
Results 1 to 6 of 6

Find value by looking two or more columns in other sheet.

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    Matamoros, Mexico
    MS-Off Ver
    Excel 2007
    Posts
    52

    Question Find value by looking two or more columns in other sheet.

    Hello to all...

    I have a table in which I want to find the a specific value in other sheet. The column Q is where I want the value to be shown. My criterias are column B or C.

    See image1: PPlan2.png. This sheet is called "Models".

    And the Matrix is located in another sheet of the same workbook called "PPlan" in column M.
    See image2: PPlan1.png

    From column R and forward in the PPlan Sheet are my conditions in different columns according to family.
    For example, in row 11 my family is "DCH" which include "DCH-3XXX" and "DCH-64XX" models.

    The tricky part is the following:
    1. Compare the Models shown in the PPlan Sheet with the models of columns B and C of Models sheet.
    Lets take as reference DCH-3XXX.
    As you can see in image2, model in cell R11 must be compared with models in colums B and C (image1).
    2. Return the corresponding model. It can be either in column B or C.
    3. Return the value of the corresponing model in Cell Q22 of Model Sheet. In this case is 4200.
    4. Continue with the next model "DCH-64XX" and repeat all the steps.
    5. If more Models are found, repeat the steps untill no more models are to be found in that row.

    I am stuck with this and is the last thing that I need to complete a report.

    I know it's kind of difficult and tricky. I been searching with not enough good luck. Some solutions looked good but they use some conditions that didn't match my requirements at all.

    I will appreciate all the help that you can give me. One more thing, I know that a VBA Code can do the job but I prefer formulas. Due to security setting in my office computer, I am not allowed to save VBA Codes.

    Best regards and please have a great day.

    SamCV.
    Matamoros, Mexico.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Find value by looking two or more columns in other sheet.

    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)

    Having said that, you could try something like IFERROR(vlookup-to-search-in-B),vlookup-to-search-in-C)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-03-2013
    Location
    Matamoros, Mexico
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Find value by looking two or more columns in other sheet.

    Quote Originally Posted by FDibbins View Post
    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)

    Having said that, you could try something like IFERROR(vlookup-to-search-in-B),vlookup-to-search-in-C)
    Than you for the advice. I appreciate it.

    I prepared an excel file to show what I need. I hope it can be of help.
    If a formula can be kind of "head crusher", a VBA code can work. I will try to adapt it to the final report.

    As I said first, I prefer formula.

    Thank you.

    SamCV.
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Find value by looking two or more columns in other sheet.

    Thanks for the file.

    Im confused, which way is this going? You want the answer to be shown in Models, right? If so, then Im a little confused by your description...

    ...........................
    1. Compare the Models shown in the PPlan Sheet with the models of columns B and C of Models sheet.
    Lets take as reference DCH-3XXX.
    row 11 contains DCH-6XXX DCH-64XX
    As you can see in image2, model in cell R11 must be compared with models in colums B and C (image1).
    ..........................

    Walk me through how you would do this manually?

    And what if column B contains a reference to a cell, and colmn C contains a reference to another cell?

  5. #5
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Find value by looking two or more columns in other sheet.

    Try this array formula to Q2 cell and hit Ctrl+Shift+Enter
    =SUM(IF(ISERROR(SEARCH(C4,PPlan!$F$3:$AI$10)),0,1)*PPlan!$D$3:$D$10)
    Appreciate the help? CLICK *

  6. #6
    Registered User
    Join Date
    06-03-2013
    Location
    Matamoros, Mexico
    MS-Off Ver
    Excel 2007
    Posts
    52

    Talking Re: Find value by looking two or more columns in other sheet.

    Quote Originally Posted by AZ-XL View Post
    Try this array formula to Q2 cell and hit Ctrl+Shift+Enter
    =SUM(IF(ISERROR(SEARCH(C4,PPlan!$F$3:$AI$10)),0,1)*PPlan!$D$3:$D$10)
    Hello AZ-XL!!!

    I haven't the thread for a while. I reviewed your approach, and it it's great!!!

    Great job, simple and to the point. I really really appreciate this great help. I had begin to use a pivot and I was worried because I had refresh every time. But with this formula, it perfectly suits my needs.

    Thank you again and very sorry for the delayed answer. You have my gratitude.

    Please have a great day and an excellent weekend.
    (Que tengas un gran día y un excelente fin de semana)

    SamCV.
    Matamoros, Mexico.
    Attached Files Attached Files

+ 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. Find last visible row with data in sheet and hide unused columns
    By specialk610 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-15-2013, 10:04 AM
  2. Find a value from another sheet and add new columns
    By priyanal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2012, 12:21 PM
  3. Find and replace columns with others of another sheet
    By Costasg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2011, 11:32 AM
  4. find data in one column and copy it in various columns in another sheet
    By Astrid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2009, 04:59 AM
  5. Find duplicates from 4 columns in excel sheet
    By RompStar in forum Excel General
    Replies: 3
    Last Post: 08-24-2005, 02:05 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