Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8322875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:31:54+00:00 2026-06-08T23:31:54+00:00

I’m trying to create a formula to check if the value in a cell

  • 0

I’m trying to create a formula to check if the value in a cell has the string correct or incorrect. If the value in the cell is incorrect then a value from another worksheet should be copied into current worksheet. Below is an example worksheet.

Worksheet 1

Col A   Col B    Col C   Col D
-------------------------------
A       1        Correct
B       2        Correct
C       1        incorrect

Worksheet 2

Col A   Col B    Col C
----------------------
 A       1      Correct
 B       2      Correct
 C       3      Correct

Using the example worksheet above the first and second row of column D should be empty as there corresponding cells in column C have the value correct, but in the third row of column D the value 3 from column B worksheet 2 should be copied into the cell as the third row of column C has has value incorrect.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:31:57+00:00Added an answer on June 8, 2026 at 11:31 pm

    I’m going to assume that the data in Worksheet 1, Column 2 is being tested because it has been entered manually. Otherwise, a formula could provide the correct answer every time.

    Because there isn’t much detail, I’ve looked at it as if it was some type of test sheet, with the test on Worksheet 1 and the answers on Worksheet 2.

    I used a VLOOKUP in both Column C and D. In column C, the formula I used is:

    =IF(VLOOKUP(Sheet1!$A2,Sheet2!$A$1:$B$3,2,FALSE)=$B2,"Correct","Incorrect")
    

    This gives you the Correct or Incorrect value in Column C. We can then use the same VLOOKUP a second time to return the correct answer in Column D, if required.

    =IF($C2="Incorrect",VLOOKUP(Sheet1!$A2,Sheet2!$A$1:$B$3,2,FALSE),"")
    

    It would be more efficient to do the vlookup once, hold that value in a different column, and then point to that column in column C or D. You could then hide that column and lock down the sheet to hide that value if that was a concern. However I used your example output without the additional column.

    I’ve attached a screenshot of the working example. Hope this is the right track – if not leave a comment and we can work it out.

    Screenshot of working example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to create an if statement in PHP that prevents a single post
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.