IF statement, Simple Question

jrwrita

Board Regular
Joined
May 7, 2015
Messages
206
Hi All,

Say I have a Vlookup, and if it returns a value I want it to say TRUE or even my own term such as 'matched', and if the vlookup returns an #N/A I want a False or my own custom term. Is there anyway to do this?

Thanks.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
What is the value the lookup returns?

As in, is it a number or text?
 
Last edited:
Upvote 0
Just my way.....

SHEET 1

ABC
1Peter22.99
2John10
3Craig20
4mark19.99
5Steven13.55
6Ralph23.44
7Roger22.22

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>


First way...

=IF(VLOOKUP(A1,Sheet1!B1:C7,2,FALSE)>15.99,"TRUE","FALSE")

Second Way

=IFERROR(IF(MATCH(A9,Sheet1!B:B,0),"TRUE"),"FALSE")
 
Upvote 0
Just my way.....

SHEET 1

ABC
1Peter22.99
2John10
3Craig20
4mark19.99
5Steven13.55
6Ralph23.44
7Roger22.22

<tbody>
</tbody>


First way...

=IF(VLOOKUP(A1,Sheet1!B1:C7,2,FALSE)>15.99,"TRUE","FALSE")

Second Way

=IFERROR(IF(MATCH(A9,Sheet1!B:B,0),"TRUE"),"FALSE")

The 1st one won't work if it doesn't find the lookup value. It will still return #N/A.
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top