+ Reply to Thread
Results 1 to 6 of 6

How to write formula to check a different worksheet?

  1. #1
    Registered User
    Join Date
    01-31-2019
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    10

    How to write formula to check a different worksheet?

    Hi,

    A little help would be most appreciated please;

    I want to look at a particular Cell in my worksheet and if it is blank to leave blank.
    If the text within the Cell is exactly the same as the text in a particular Cell in another worksheet, to state "CORRECT".
    If the text is NOT exactly the same, to state "WRONG".

    eg, I am putting the formula in Cell C10. So if Cell A12 is empty, leave Cell C10 empty. If however, Cell A12 is not empty, and is exactly the same as Cell B16 in a different named worksheet, then put "CORRECT" in C10.
    If the text in A12 is different to that in B16 of that different named worksheet, to put "WRONG" in Cell C10.

    Hope this makes sense.

    Thank you.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,365

    Re: How to write formula to check a different worksheet?

    Try this:

    =IF(A12="","",IF(AND(A12<>"",A12=Sheet2!B16),"Correct","Wrong"))

    where Sheet2 is the other sheet.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-31-2019
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: How to write formula to check a different worksheet?

    Hi,

    Not sure if my reply was sent.
    It didn't quite work. Answer coming up with #NAME?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,365

    Re: How to write formula to check a different worksheet?

    Did you change Sheet2 to the name of the real sheet you want to refer to?

  5. #5
    Registered User
    Join Date
    01-31-2019
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: How to write formula to check a different worksheet?

    Yes I did but after inserting ' before and after the other worksheet name, it did work.

    Thank you very much for kind help.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,365

    Re: How to write formula to check a different worksheet?

    Ah - that would be because you have spaces in the sheet name - I ought to have warned you of that.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Add error check and write not found item to a worksheet
    By Mustang65 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2019, 04:59 AM
  2. Check for value or write new line
    By bellicusa in forum Excel General
    Replies: 3
    Last Post: 01-19-2017, 02:54 AM
  3. Replies: 5
    Last Post: 03-10-2016, 02:24 PM
  4. [SOLVED] Need a formula that will check a cell against a worksheet and return a certain value
    By Kikei in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-20-2013, 10:22 PM
  5. How to write this worksheet formula in VBA
    By Excelfriend in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-01-2010, 12:05 PM
  6. Replies: 1
    Last Post: 09-23-2005, 07:05 PM
  7. Replies: 5
    Last Post: 06-04-2005, 09:05 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