Locating values in a string with 2 sets of quotes

topswim

Board Regular
Joined
May 14, 2002
Messages
133
Office Version
  1. 365
Platform
  1. Windows
Here is what I am trying to do. I need to retrieve a string that consist of
2 sets of quotes from within another string. here is the example below of the string I am trying to pull.

I want to grab "accountType":"I" from this string "lastName":"NEWSHCDEV","title":"","suffix":""},"accountType":"I","accountS...

Thank you
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
What determines what string you are extracting? If that string is in A1, this is one approach but it makes a number of assumptions:

=MID(A1,FIND("accountType",A1)-1,17)
 
Upvote 0
Same question as kweaver asked. Here is another possible formula which also makes a number of assumptions (different from the one's kweaver made)...

=MID(LEFT(A1,FIND(",",A1,FIND("}",A1)+2)-1),FIND("}",A1)+2,99)
 
Upvote 0
Hi,

Thanks for responding. I think I can work with what you have sent. I was originally thinking on how I could actually enter the "accountType":"I" as text in a formula since there are two separate sets of quoted values
 
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,790
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top