nav100
nav100

Reputation: 3143

How to swap text between double quotes using EXCEL formula

I am trying to swap text between double quotes in EXCEL single cell.

Example Text:  {"TEST1", "METHOD"},

Expected Result: {"METHOD", "TEST1"},

Tried this function but it doesn't work.

=right(A1,len(A1)-find(" ",A1))&" "&left(A1,find(",",A1)-1)

Upvotes: 0

Views: 51

Answers (2)

bosco_yip
bosco_yip

Reputation: 3802

A shorter formula option

="{"&SUBSTITUTE(MID(A1&A1,FIND(",",A1)+2,LEN(A1)-2),"}{",", ")&"}"

Upvotes: 0

JvdV
JvdV

Reputation: 75870

Try:

enter image description here

Formula in B1:

="{"&MID(A1,FIND(",",A1)+2,LEN(A1)-FIND(",",A1)-2)&", "&MID(A1,2,FIND(",",A1)-2)&"}"

Upvotes: 1

Related Questions