Use array of possible values in a NON array if formula

drom

Well-known Member
Joined
Mar 20, 2005
Messages
543
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and thanks in advance!

I have a column with strings.
This strings may en with values such as:
"1"
"2"
"3"
"4"
"5"​
I need a formula to let me know if ig any of this values is meet
I do not want to use Countif, because this eg is gonna be used in a bigger nested formula

I need some thing like
=IF(RIGHT(A2;1)={"1";"2";"3";"4";"5"};"OK";"Wrong")


My problem comes because:
If A1 end in 1, eg: "France1" I get "OK"
If A5 end in 2, eg: "Italy2" I get "Wrong"
and for this 2nd eg, I need "OK"​

ps:
I Can't use
5 IFS
one other column
Vlookups​

This is why I am trying to correct
=IF(RIGHT(A2;1)={"1";"2";"3";"4";"5"};"OK";"Wrong")
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
DONE
=IF(MATCH(RIGHT(A1;1);{"1";"2";"3";"4";"5"};0);"OK";"Wrong")
 
Upvote 0
Or, added a OR() in the logical test

=IF(OR(RIGHT(A2;1)={"1";"2";"3";"4";"5"});"OK";"Wrong")

Regards
Bosco
 
Upvote 0

Forum statistics

Threads
1,223,923
Messages
6,175,410
Members
452,640
Latest member
steveridge

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