Got a string of data in a cell and wanting to pull some data out of it

Jaffabfc

Board Regular
Joined
Jul 5, 2013
Messages
230
Office Version
  1. 365
Platform
  1. Windows
Hi,

So in cell G2 i have a string of data and i am wanting to pull bits out of it.
The cell shows
"{"options": [{ "name" : "size", "value" : ""},{ "name" : "ruling", "value" : ""},{ "name" : "colour", "value" : "Blue"},{ "name" : "pages", "value" : ""},{ "name" : "packsize", "value" : ""},{ "name" : "personalisation", "value" : ""}]}"

And in J1 i have Size in K1 i have Ruling L1 Colour etc etc.
in J2/K2/L2 i would want the value that is showing above as "" for when i drag the formulas down

So if the size in the string above had the value of 123 instead of "" i would want it to show in cell K2 123.

i havent a clue where to start with this one can someone help

thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
This in J2

Excel Formula:
=LET(sp,TEXTSPLIT(G2,": "),TEXTAFTER(FILTER(sp,ISNUMBER(SEARCH(", ",sp))),", "))
 
Upvote 0
Try
Book1
GHIJKLM
1sizerulingcolourpagespacksizepersonalisation
2"{"options": [{ "name" : "size", "value" : ""},{ "name" : "ruling", "value" : ""},{ "name" : "colour", "value" : "Blue"},{ "name" : "pages", "value" : ""},{ "name" : "packsize", "value" : ""},{ "name" : "personalisation", "value" : ""}]}"  Blue   
Sheet1
Cell Formulas
RangeFormula
H2:M2H2=TRIM(TEXTBEFORE(TEXTAFTER(SUBSTITUTE($G2,CHAR(34),""),H$1&", value :"),"}"))
 
Upvote 0
This in J2

Excel Formula:
=LET(sp,TEXTSPLIT(G2,": "),TEXTAFTER(FILTER(sp,ISNUMBER(SEARCH(", ",sp))),", "))
This doesnt let me enter the formula for some reason brings up an error straight away
 
Upvote 0
I had semi colons as function separator. I did chagne the post, could you try again?
 
Upvote 0
Try
Book1
GHIJKLM
1sizerulingcolourpagespacksizepersonalisation
2"{"options": [{ "name" : "size", "value" : ""},{ "name" : "ruling", "value" : ""},{ "name" : "colour", "value" : "Blue"},{ "name" : "pages", "value" : ""},{ "name" : "packsize", "value" : ""},{ "name" : "personalisation", "value" : ""}]}"  Blue   
Sheet1
Cell Formulas
RangeFormula
H2:M2H2=TRIM(TEXTBEFORE(TEXTAFTER(SUBSTITUTE($G2,CHAR(34),""),H$1&", value :"),"}"))
as much as this looks like it should work it doesnt seem to be working for me.
the string of data in cell G2 was sql does that make any difference?
 
Upvote 0
as much as this looks like it should work it doesnt seem to be working for me.
the string of data in cell G2 was sql does that make any difference?
What didn't work specifically?
 
Upvote 0
Ok that is good, formula works. Make sure y don’t have any data next to j2.

So clear j2,k2,l2 etc
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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