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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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,847
Messages
6,121,911
Members
449,054
Latest member
luca142

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