+ Reply to Thread
Results 1 to 6 of 6

Check if cell = another cell

  1. #1
    Registered User
    Join Date
    06-26-2012
    Location
    Nakskov, Denmark
    MS-Off Ver
    Excel 2011
    Posts
    2

    Check if cell = another cell

    Hello,

    I have run into a problem.

    I need to check if my ItemCode-cell = an ItemCode-cell in another document. If true, it should write from a cell in the other document. If false, it should just be blank.

    I have tried this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If the ItemCode in Document 1 = any ItemCode in 'Vareliste 21-06-2012.xlsx', it should write the 'Konk. Pris' cell text from the row that contains the proper ItemCode. If there is no ItemCode match, then just "".

    What am I doing wrong?

    Thanks,
    Patrick

  2. #2
    Registered User
    Join Date
    05-12-2011
    Location
    Madurai, Tamil Nadu - India
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Check if cell = another cell

    Attach the excel with data pls

  3. #3
    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,938

    Re: Check if cell = another cell

    i think a simpler formula should give you what you need...

    =if(1st-cell-to-check=2nd-cell-to-check, the-cell=you-want-the-value-from, "")
    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

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Check if cell = another cell

    unless you are trying to compare case-sensitive text strings in two places, avoid EXACT and go with @fdibbins' suggestion. see if that helps you any.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  5. #5
    Registered User
    Join Date
    06-26-2012
    Location
    Nakskov, Denmark
    MS-Off Ver
    Excel 2011
    Posts
    2

    Re: Check if cell = another cell

    Quote Originally Posted by FDibbins View Post
    i think a simpler formula should give you what you need...

    =if(1st-cell-to-check=2nd-cell-to-check, the-cell=you-want-the-value-from, "")
    Well, yes, that would partly solve the problem I have, but it needs to check if any cell in the ItemCode col has the value.

    =if($A$2=Any cell in column A;[@[Konkur. Pris]] to the corresponding [@ItemCode];"")

    That is what I want to do.

  6. #6
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Check if cell = another cell

    let us say that you have $A$2 value in Sheet1 that you want to check for existence in Sheet2's entire column A, you would use something like this to check that:

    Please Login or Register  to view this content.
    in your formula, that might translate to (check to confirm):

    Please Login or Register  to view this content.

+ 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