Franco
Franco

Reputation: 15

Google Sheet | Extract multiple values from one string

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= //

Upvotes: 0

Views: 592

Answers (1)

JPV
JPV

Reputation: 27282

See if this helps

=join(", ", filter(split(A1, " "), regexmatch(split(A1, " "), ".*KT|MPS")))

Upvotes: 1

Related Questions