# Thread: Compare 2 Values (2003)

1. ## Compare 2 Values (2003)

I feel like what I'm trying to do is quite straight forward, but I'm not able to come up with a formula (that works).

Concept: If ‘TC Scenario’!B\$15 = ‘Data Feed At’!B\$5 the value should be "OK" If they are not equal, the value should be "Error"

2. ## Re: Compare 2 Values (2003)

=IF(‘TC Scenario’!B\$15=‘Data Feed At’!B\$5,"OK","Error")
should work.

3. ## Re: Compare 2 Values (2003)

Edited by HansV to replace Word attachment with the picture it contained, to save the reader a few clicks

That is exactly what I tried. I got an error message. It gets caught up on the 'TC

Too, I even tried using the defined range name (TC_Scenario). That didn't work either.

4. ## Re: Compare 2 Values (2003)

It works fine for me in a test workbook. Can we see a stripped down copy of your workbook?

5. ## Re: Compare 2 Values (2003)

I did correct one error, but it still didn't help. I was ON the Data Feed page. So, I removed the "data feed At" reference and just kept the cell reference.

I attached a sample. To down scale the sample, I removed most things, so my cell references have shifted.

Here is what I am trying to achieve:
In C19, I want to compare Sheet TC Scenario, Cell B15 to the value in this data sheet, C2. If they are =, then "OK". Otherwise, "error"

In Cell C20, If the value in B16 =Serious AND the value in C3 = YES, then "OK". Otherwise, "error"

In Cell C21, If the value in B17 = Unlisted AND the value in C7 CONTAINS a YES, then "OK". Otherwise, "error"

6. ## Re: Compare 2 Values (2003)

You've got "smart quotes" around the sheet name, they should be straight quotes.
The easiest way to get it right is to edit the formula, delete the entire reference to TC Scenario cell B2, then activate TC Scenario and point to cell B2.

7. ## Re: Compare 2 Values (2003)

AHHHH, the little things!

It worked

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•