Reputation: 4691
I need to achieve something like following in Google-sheets:
tag_name
A_B_C C
A_B_C_D D
I am using following formaula:
=INDEX(SPLIT(B2, "__"), 0, 3)
I want to dynamically pass last index of the set of values returned by split.
Upvotes: 2
Views: 3109
Reputation: 1
for arrayformula try:
=ARRAYFORMULA(IFNA(REGEXEXTRACT(A1:A; "_(.)$")))
Upvotes: 1
Reputation: 990
You can try REGEXEXTRACT formula, I am assuming your data range starts from "A1". Put this formula in "A1" and fill it down per your requirement
=REGEXEXTRACT(A1,"\S$")
Upvotes: 4