Return a specific text within a string

DevinSuth

New Member
Joined
Jun 3, 2015
Messages
10
I am in need of assistance with this one.

I have multiple cells that contain different sets of data...
A B C D
OVC005 FEW030 SCT075 BKN150 BKN020 BKN075 OVC150 BKN015 BKN075 OVC120

I Need a formula to return the text behind "BKN" or "OVC" as seen below....and if that's not complicated enough I only need it to return those 3 number if it is "015" or less.

A B C D
005 150 020 015

so A I would need "005" B and C would be blank and D would return the value of "015".

Ideas??? Formulas....please help!!!!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I am in need of assistance with this one.

I have multiple cells that contain different sets of data...
A B C D
OVC005 FEW030 SCT075 BKN150 BKN020 BKN075 OVC150 BKN015 BKN075 OVC120

I Need a formula to return the text behind "BKN" or "OVC" as seen below....and if that's not complicated enough I only need it to return those 3 number if it is "015" or less.

A B C D
005 150 020 015

so A I would need "005" B and C would be blank and D would return the value of "015".
I am sorry, but your instructions are not clear. You only want 4 values if what is "015" or less?

What should happen if the value is greater than "015"?

Also, why did you skip BKN075 that is located between BKN020 and OVC150?

What do you mean that B and C would be blank... you show values in them?
 
Upvote 0
If I have a cell that has

BKN015 BKN075 BKN012

I only need it to send me the "015"

If I have a cell that has

SCT005 BKN010 BKN030

I need it to display "010"
 
Upvote 0
this is for sky condition, I will have SKC FEW SCT BKN OVC
I only need the last 3 digits after BKN and OVC if the number is "015" or less
 
Upvote 0
that was a typo on my part

the way the data is input into the system its always from lowest to hightest

it should have been BKN120

so SCT005 SCT010 BKN012 OVC015
I would need 012
 
Upvote 0
=iferror(iferror(if(right(mid(d$10,find("bkn",d$10,1),6),3)<"016",right(mid(d$10,find("bkn",d$10,1),6),3),if(right(mid(d$10,find("ovc",d$10,1),6),3)<"016",right(mid(d$10,find("ovc",d$10,1),6),3),"")),if(right(mid(d$10,find("ovc",d$10,1),6),3)<"016",right(mid(d$10,find("ovc",d$10,1),6),3),"")),"")
 
Upvote 0
Control+shift+enter, not just enter:

=IFERROR(TEXT(1/(1/MIN(IF(ISNUMBER(MATCH(MID(A2:D2,1,3),{"BKN","OVC"},0)),REPLACE(A2:D2,1,3,"")+0))),"000"),"not available")

If the items are not in cells of their own as assumed here, just dismiss this suggestion.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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