If Formula

kumar1803

Board Regular
Joined
Jan 7, 2015
Messages
110
Hello,

I need help creating a IF formula based on the following situation:

Column A
367150
367850

If the 4th digit in column A is 1 then i say " YES" anything else " NO"

Thank you in advance for your help!!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try this:

Code:
=IF(MID(A1,4,1)="1","yes","no")

Update the "A1" portion to be your start row, put in to the cell you want and copy down.
 
Upvote 0
kumar1893,
The solution depends on how you are entering the values in A! and A2. Are they strings or numbers. if they are numbers are the values always 367,some number,50. If so them just subtract 367150 from the value entered, if the result is zero you have a match and you would output Yes to the cell your display cell, if it is not zero then you do not have a match and you would output NO to your display cell. If the numbers can be anything and all you care about is if the fourth digit is a 1, One, then things get real complicated real quickly. If however, you are entering these values as strings, then just use any of the sting manipulation functions, Left(), Mid(), or Right() functions to determine what is in the fourth position and again output a Yes or No depending on what is found.
Hope that helps,
Computerman
 
Upvote 0

Forum statistics

Threads
1,224,915
Messages
6,181,724
Members
453,064
Latest member
robatthe2A

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