rimrattlerla11
New Member
- Joined
- Jan 27, 2016
- Messages
- 17
I have a large dataset (about 500k rows) w/ text and I am only trying to extract the portion of text whenever the code is null or has a "C-*" code.
The nulls or "C-" codes don't appear in every row, so for those a simple "OK" in the output to differentiate those will do.
Each cell of the worksheet is in a format similar to below:
[{"code":null,"long_name":"null","name":"QWERTY","msrp":0,"includes":[]},{"code":"C-STD","long_name":"BLK","name":"BLK ","msrp":0,"includes":[]},{"code":"ABC","long_name":"ABC","name":"ABC","msrp":100,"includes":[]},.........]
The beginning and end of the cell has the "[" and "]" braces and each code and its pertinent info is enclosed within "{" and "}" with a comma separating each.
The desired output of the above example is to extract only the portion of text where "code":null or "code":"C-*" into the adjacent cell. I am using the "*" as a wildcard, since the "C-" codes can have a variety of letters following it.
{"code":null,"long_name":"null","name":"QWERTY","msrp":0,"includes":[]},{"code":"C-STD","long_name":"BLK","name":"BLK ","msrp":0,"includes":[]}
OR if "code":null or "code":"C-*" is not found, output the word "OK."
OK
Please let me know if anything was unclear. I can try to provide more examples.
I'm out of my element with VBA and I'm fairly certain I need some VBA code to make this happen.
Thanks in advance for any help you can provide!
The nulls or "C-" codes don't appear in every row, so for those a simple "OK" in the output to differentiate those will do.
Each cell of the worksheet is in a format similar to below:
[{"code":null,"long_name":"null","name":"QWERTY","msrp":0,"includes":[]},{"code":"C-STD","long_name":"BLK","name":"BLK ","msrp":0,"includes":[]},{"code":"ABC","long_name":"ABC","name":"ABC","msrp":100,"includes":[]},.........]
The beginning and end of the cell has the "[" and "]" braces and each code and its pertinent info is enclosed within "{" and "}" with a comma separating each.
The desired output of the above example is to extract only the portion of text where "code":null or "code":"C-*" into the adjacent cell. I am using the "*" as a wildcard, since the "C-" codes can have a variety of letters following it.
{"code":null,"long_name":"null","name":"QWERTY","msrp":0,"includes":[]},{"code":"C-STD","long_name":"BLK","name":"BLK ","msrp":0,"includes":[]}
OR if "code":null or "code":"C-*" is not found, output the word "OK."
OK
Please let me know if anything was unclear. I can try to provide more examples.
I'm out of my element with VBA and I'm fairly certain I need some VBA code to make this happen.
Thanks in advance for any help you can provide!