Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
156 views
in Technique[技术] by (71.8m points)

Excel extract value appearing after searched string

I've got an Excel spreadsheet with columns containing product attributes formatted this way:

ca_colour=WHITE,ca_min_order_qty=4,ca_season=SS17,ca_sentiment=Inspiration,ca_type=Candles

I've got hundreds of products for which I need to extract e.g. value of ca_season and I'm really struggling with figuring this one out. Different products might have ca_season in a different place of this cell.

I would appreciate any help with writing a formula for this search. Thank you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Alternatively, if one has Excel 365, try:

enter image description here

Formula in B1:

=LET(X,FIND("ca_season=",A1)+10,MID(A1,X,FIND(",",A1&",",X)-X))

More generic:

enter image description here

=LET(X,FIND(C1,A1)+LEN(C1)+1,MID(A1,X,FIND(",",A1&",",X)-X))

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...