0

I am trying to extract all the strings end with "KT" and put them into one cell, however it only show the first result (24010KT) Preferred result: 24010KT,VRB05KT,21008KT,26008KT,VRB04KT

I used below formula, =REGEXEXTRACT(A1,"\w+KT")

String in A1 // TAF 110500Z 1106/1212 24010KT 9999 FEW010 SCT030 TX33/1106Z TX32/1206Z TN28/1122Z TEMPO 1106/1112 4000 SHRA FEW010CB SCT020 TEMPO GR 1109/1115 VRB05KT TEMPO 1120/1202 4000 SHRA FEW010CB SCT020= SS METAR 110630Z 21008KT 190V250 9999 FEW018 32/24 Q1007 NOSIG=
METAR 110530Z 26008KT 240V300 9999 2800N SHRA FEW018 31/26 Q1008 NOSIG= SS METAR 110430Z VRB04KT 9999 FEW018 SCT028 32/25 Q1008 NOSIG= //

1 Answer 1

1

See if this helps

=join(", ", filter(split(A1, " "), regexmatch(split(A1, " "), ".*KT|MPS")))
Sign up to request clarification or add additional context in comments.

4 Comments

This is what I want. Thanks a lot. But if I also want to extract "*MPS" OR "*KT", how should I amend the formula?
Glad to hear that worked. Since you are new here, you may want to check out this link.
I updated the formula so that it should work for strings ending with 'MPS' or 'KT'. Hope that helps?
Thank you. That's really help!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.