+ Reply to Thread
Results 1 to 19 of 19

Matching Data / Lookup from different sheets

  1. #1
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Matching Data / Lookup from different sheets

    Hi everyone,

    I have a question about how to match up data from one sheet to another. I've attached an example of what I want to do.



    Example:

    Sheet1 has 15 rows and 17 columns of information (numbers) in each cell.

    Sheet2 has 1 column of numbers of 75 cells of information (numbers).

    What I want to know if it's possible is that every cell in sheet2 be compared with sheet1 and if a cell from sheet2 matches with a cell in sheet1 you can change the font color or background color or similar? Also the information from sheet2 will change often.


    Thanks in advance,
    Elegidos (Spain)
    Attached Files Attached Files
    Last edited by Elegidos; 10-10-2009 at 08:03 PM. Reason: More questions related to this topic.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Matching Data / Lookup from different sheets

    First name the range in Sheet1...

    Select the range and in the top left area of the sheet, next to the formula bar, in the Name Box, enter the word RANGE.

    Then in Sheet2, select all of column D and go to Format|Conditional Formatting.. then select Formula Is and enter formula:

    =COUNTIF(RANGE,D1)

    Click Format and choose from the Pattern Tab
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    First name the range in Sheet1...

    Select the range and in the top left area of the sheet, next to the formula bar, in the Name Box, enter the word RANGE.

    Then in Sheet2, select all of column D and go to Format|Conditional Formatting.. then select Formula Is and enter formula:

    =COUNTIF(RANGE,D1)

    Click Format and choose from the Pattern Tab
    Perfect, thank you very much. The only problem is that I wanted it backwards but I figured it out since it's doing it the other way around. Thanks


    First name the range in Sheet2...

    Select the range and in the top left area of the sheet, next to the formula bar, in the Name Box, enter the word RANGE.

    Then in Sheet1, select all the cells with the numbers and go to Format|Conditional Formatting.. then select Formula Is and enter formula:

    =COUNTIF(RANGE,A1)

    Click Format and choose from the Pattern Tab

  4. #4
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    P.D.

    Forgot to attach the example with the solution. Just incase it helps more people if they have the same question.
    Attached Files Attached Files

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Matching Data / Lookup from different sheets

    Thanks for the feedback

    Can you please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  6. #6
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    Thank you for the help .

    Before I change it to solved. One quick question. Using the same example in the first post. Instead of looking up the informatcion from sheet2, can it be done thru a text file?

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Matching Data / Lookup from different sheets

    You mean look for words in a Word Document or similar?

    I don't think so, not without some VBA possibly....

    If that is what you really want, then post in the programming forum..with descriptive title.

  8. #8
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    Thank you NBVC. I will do so then .

    Un Saludo,
    Elegidos (Spain)

  9. #9
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    Another question related with the first post above. If instead of having just a number in each cell I have for example: "1250" or "system_id":"310415" in a cell (including the "" ). Can I lookup up for that data even if it isn't exact?


    Thanks again

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Matching Data / Lookup from different sheets

    You can use wildcard...*

    e.g

    =COUNTIF(RANGE,"*"&A1&"*")

    this would find 310415 (A1) in "system_id":"310415" (within RANGE)

  11. #11
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    Thanks for the quick reply but seems like it doesn't work for some reason.

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Matching Data / Lookup from different sheets

    If you have somewhere in RANGE entered in a cell: "system_id":"310415"

    and then you have 310415 entered in A1,

    Then my formula,
    =COUNTIF(RANGE,"*"&A1&"*"), works.. I tested it.

    Can you post your sheet if you still have problems...

  13. #13
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    If you have somewhere in RANGE entered in a cell: "system_id":"310415"

    and then you have 310415 entered in A1,

    Then my formula,
    =COUNTIF(RANGE,"*"&A1&"*"), works.. I tested it.

    The formula works great when the number (310415) is surrounded by characters ("system_id":"310415"), but when the number is by itself in a cell doesn't seem to work. At this moment that isn't a problem, thanks.

    Another question. In Condition Formatting, you can have only a max of 3 conditions. Is there a way to have 2 or more conditions in 1 condition and have different formats for the conditions?

    Example:

    Condition 1: =COUNTIF(range,A1)
    Condition 2: =COUNTIF(range2,A1)

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Matching Data / Lookup from different sheets

    Try this instead:

    =SUMPRODUCT(--(ISNUMBER(SEARCH(A1,Range))))


    You can combine formulas with AND() or OR() to determine if both conditions must be true or just one.
    Last edited by NBVC; 10-08-2009 at 11:28 AM.

  15. #15
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    Ok thanks, but with the combine function how would it be? Like the following:


    =COUNTIF(range,A1) and (range2,A1)

  16. #16
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Matching Data / Lookup from different sheets

    =AND(COUNTIF(range,A1),COUNTIF(range2,A1))

    for both to be TRUE...

    =OR(COUNTIF(range,A1),COUNTIF(range2,A1))

    for any one to be TRUE

  17. #17
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    Great help NBVC. Thanks agian.


    This post solved. More coming up xD.

  18. #18
    Registered User
    Join Date
    10-06-2009
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Matching Data / Lookup from different sheets

    I have another question related with this topic.


    I have 3 sheets. And in the sheet #2 is where I have the conditions. The only problem is that I have 2 conditions that do the same lookup: Condition 1 and 3.

    Condition 1: Makes the text bold and colors the background cell to orange.
    (from Sheet 3)


    Condition 3: I want the text to become Italic and underline. But it seems that condition 1 has priority and this condition doesn't do nothing.
    (from Sheet 1)

    Both conditions from different sheets lookup the same information.

    Any help please?


    Thanks

  19. #19
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Matching Data / Lookup from different sheets

    Please start a new thread as this is a new topic... thanks.

+ 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