Extracting a certain code from a cell using MID function searching multiple criteria

Status
Not open for further replies.

pedexe90

Board Regular
Joined
Apr 18, 2018
Messages
59
Hi everyone,

I'm re posting this as my previous thread was a bit confusing and didn't get any replies.

I would like column D:D to be populated with a function rather than manually. This column contains H codes taken from E:E. The codes are in this format: H0xx-H9xx (4 characters, first character is fixed as H the second character varies from 0 to 9 and the third and fourth characters are random).

I would like one formula to extract the code and return it to column D as seen in the attached file.

You may also enhance my formula, I don't know how to incorporate an OR function to this so. Now it only returns H0xx.

Code:
[COLOR=#333333]=IFERROR(MID(E2,SEARCH({"H0","H1","H2","H3","H4","H5","H6","H7","H8","H9"},E2),4),"")[/COLOR]

https://1drv.ms/x/s!AgQdYsSdg735eSFFPKUE3l_bjqM (Attached in One Drive)

Many thanks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Duplicate https://www.mrexcel.com/forum/excel...variable-code-another-column.html#post5075323

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

If you do not receive a response, you can "bump" it by replying to it again, though we advise you to wait 24 hours before doing and not to bump a thread more than once a day.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,712
Messages
6,174,031
Members
452,542
Latest member
Bricklin

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