Using MID then IF to the result, is this possible?

Related1

New Member
Joined
May 22, 2017
Messages
21
Hi!

Not a seasoned user here so please be gentle :)

How would I combine two formulas when one is dependent on the other?

For example I am using the MID formula first to pull out letters I need. There are several answers that can be returned, but if the answer is BE, I would like it changed to BEX.

I am using =MID(A11,5,2) (I suppose I could change the 2 to a 3 but I only need 3 characters returned if it is BEX)

1111UA01154
1234SA0127-01
1014GL014-01
1355BEX01-11

So after using the MID formula, how would I use a formula to say IF answer = BE, THEN change to "BEX" but if not BE then the original answer is used (UA, SA, or GL).

I'm stumped. Thanks for any help!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
If the character after the letters is always a 0, then perhaps:

=SUBSTITUTE(MID(A11,5,3),0,"")
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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