Excel formula question

TravelMI

New Member
Joined
Oct 4, 2016
Messages
10
Hi,

I need a formula that will do the following, =IF(A1≥300,"YES","NO") but cannot seem to get it working.

The formula essentially needs to read A1, ignore the first two characters of the cell and output YES if the number is more than or equal to 300.

Below is an example of the data set and my desired output. NOTE: NA needs to be accounted for and should be output as "NO".

Any insight into formula to try would be greatly appreciated!

AA150NO
BB200NO
CC300YES
DD299NO
NANO


 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
One way (assuming there are always 2 leading chars):

Code:
=IF("NA"=LEFT(A1,2),"no",IF(1*RIGHT(A1,LEN(A1)-2)>=300,"yes","no"))

Another way (not required to have only 2 leading chars):

Code:
=IFERROR(IF(VALUE(RIGHT(A1,LEN(A1) - MIN(SEARCH({0,1,2,3,4,5,6,7,8,9}, A1&"0123456789")) +1))>=300,"yes","no"),"no")
 
Last edited:
Upvote 0
BTW, if you have 2016 or later you can use TEXTJOIN:

Code:
=IFERROR(IF(1*TEXTJOIN("",TRUE,IFERROR((MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)*1),""))>=300,"yes","no"),"no")
 
Upvote 0
Thank you and yes there are always at least two characters (leading or just NA) so that first formula seems to work nicely. Thanks again!
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

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