Using Defined Names in a IF Statement

tycasey17

Board Regular
Joined
Sep 26, 2013
Messages
93
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
A1 = PVT

=IF(A1=_OFF,"Yes","No")

The Defined Name of "_OFF" list officer ranks and PVT would not be one of them so the result should be NO. However, this formula doesn't work it returns a #VALUE! error. I was trying to avoid using a VLOOKUP statement for this to keep my formula a little cleaner because this will be a series of nested IF statements.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
If the range _OFF consists of more than one value/cell then you can't compare it to a single value using =.

Can you explain how you will want to expand the formula?

PS To find out if a value is in a range you can use MATCH.
 
Upvote 0
Faster, yes, but not quite as fun :)

What makes it more appropriate (besides being faster)?
I do like that MATCH can use wildcards which could be helpful here
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,551
Messages
6,120,156
Members
448,948
Latest member
spamiki

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