Mike

ismilewhenyousmile

Banned user
Joined
May 23, 2017
Messages
3
Hello,
Cell A1 = SX17010006
Cell A2 = SX17010006
Cell A3 = SX16120001
Cell A4 = SX15070004
I need a formula which read first four alphanumeric characters in any of above cells and return relevant year (i.e. 2017 or 2016 or 2015) basis finding. If it is SX17 then result should be 2017, if it is SX16 then result should be 2016, so on.
Kindly assist.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Welcome to the Board!

Weird thread title, but try this:
Code:
="20" & MID(A1,3,2)
 
Upvote 0
Nonsense formula !
Did you actually try it?

If you have "SX17010006" in cell A1, that formula will return "2017", which appears to be what you are after from your original question.
 
Upvote 0
when someone put a question asking help, the responding person need to understand the query, and prior replying try to see if the answer really fits to the question. None have time to waste.

Throwing just "any answer" is a kind of fun, example a patient appear in hospital need assistance. Prior giving remedy, doctor need to understand whether the medication really fits to the patient.

"Nonsense reply" - means the reply or the solution that prescribed does not make any sense because it did not fit to the purpose.
 
Upvote 0
Silly thing about your reply is that the formula provided does exactly what you asked for. As nonsense replies go it was anything but nonsense.
 
Upvote 0
when someone put a question asking help, the responding person need to understand the query, and prior replying try to see if the answer really fits to the question. None have time to waste.

Throwing just "any answer" is a kind of fun, example a patient appear in hospital need assistance. Prior giving remedy, doctor need to understand whether the medication really fits to the patient.

"Nonsense reply" - means the reply or the solution that prescribed does not make any sense because it did not fit to the purpose.

1) You are soliciting free advice from unpaid volunteers so the presumably paid doctor analogy doesn't really hold up, but
2) Most doctors aren't going to tolerate rudeness any more than we will and posting "Nonsense reply" is just plain rude.
3) Joe's response was spot-on for the data sample you provided. If you didn't supply all of the relevant facts, then it's on you to elaborate. If you went to the doctor asking for a remedy without giving him all of the symptoms you will probably get a poor diagnosis. GIGO.
 
Upvote 0

Forum statistics

Threads
1,224,027
Messages
6,175,992
Members
452,694
Latest member
SaruwatariKaito

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