Using IF and MID together to return "0"

llf060787

New Member
Joined
May 9, 2019
Messages
1
[FONT=&quot]trying to an IF function along with a MID in extracting numberswithing a string of both text and numbers.<o:p></o:p>[/FONT]
[FONT=&quot]PBQ4X5 - using =MID(A2, SEARCH("Q",A2)+1, 1) to returnthe "4" and the same with "X" to return the numberassociated with it. Unfortunately when it runs across a sequence that doesn'tinclude either the X or the Q (PBI5G3), I get "#VALUE!". I also get"#VALUE when trying to "sum" the number columns that the formulareturns. Trying to come up with an IF formula to incorporate with the MID andSEARCH so that it will return a "0" when it can't find the particulartext (Q or X). Any help would be appreciated, I've been working on this forquite a while.<o:p></o:p>[/FONT]
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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