rimrattlerla11
New Member
- Joined
- Jan 27, 2016
- Messages
- 17
I have a large dataset in a csv file in which I am trying to append text whenever it comes across the words "PREFERRED CLASSROOM PKG." in the cell. Currently the word "null" is found where I want the text to appear.
The PREFERRED CLASSROOM PKG. text appears in the beginning or somewhere in the middle of the cell.
Each cell of the worksheet is in a format similar to below:
[{"code":null,"long_name":null,"name":"PREFERRED CLASSROOM PKG.101A","msrp":100,"includes": ]},"code":null,"long_name":null,"name":"ABCDEF","msrp":80,"includes":[]},.......]
OR
[{"code":null,"long_name":null,"name":"ABCDEF","msrp":80,"includes": ]},"code":null,"long_name":null,"name":"PREFERRED CLASSROOM PKG.101A","msrp":100,"includes":[]},.......]
The desired output inside each cell will be replacing the word null with the following two things:
1. Appending the four characters that come after the words "PREFERRED CLASSROOM PKG." to the "code" section surrounded by " " ("101A")
2. Appending the words Classroom Group and the four character code to the "long_name" section surrounded by " ". ("Classroom Group 101A")
[{"code":"101A","long_name":"Classroom Group 101A","name":"PREFERRED CLASSROOM PKG.101A","msrp":100,"includes": ]},"code":null,"long_name":null,"name":"ABCDEF","msrp":80,"includes":[]},.......]
OR
[{"code":null,"long_name":null,"name":"ABCDEF","msrp":80,"includes": ]},"code":"101A","long_name":"Classroom Group 101A","name":"PREFERRED CLASSROOM PKG.101A","msrp":100,"includes":[]},.......]
Please let me know if anything was unclear.
I'm out of my element with VBA, and I'm fairly certain I need some VBA code in order to make this happen.
Thanks in advance for any help you can provide!
The PREFERRED CLASSROOM PKG. text appears in the beginning or somewhere in the middle of the cell.
Each cell of the worksheet is in a format similar to below:
[{"code":null,"long_name":null,"name":"PREFERRED CLASSROOM PKG.101A","msrp":100,"includes": ]},"code":null,"long_name":null,"name":"ABCDEF","msrp":80,"includes":[]},.......]
OR
[{"code":null,"long_name":null,"name":"ABCDEF","msrp":80,"includes": ]},"code":null,"long_name":null,"name":"PREFERRED CLASSROOM PKG.101A","msrp":100,"includes":[]},.......]
The desired output inside each cell will be replacing the word null with the following two things:
1. Appending the four characters that come after the words "PREFERRED CLASSROOM PKG." to the "code" section surrounded by " " ("101A")
2. Appending the words Classroom Group and the four character code to the "long_name" section surrounded by " ". ("Classroom Group 101A")
[{"code":"101A","long_name":"Classroom Group 101A","name":"PREFERRED CLASSROOM PKG.101A","msrp":100,"includes": ]},"code":null,"long_name":null,"name":"ABCDEF","msrp":80,"includes":[]},.......]
OR
[{"code":null,"long_name":null,"name":"ABCDEF","msrp":80,"includes": ]},"code":"101A","long_name":"Classroom Group 101A","name":"PREFERRED CLASSROOM PKG.101A","msrp":100,"includes":[]},.......]
Please let me know if anything was unclear.
I'm out of my element with VBA, and I'm fairly certain I need some VBA code in order to make this happen.
Thanks in advance for any help you can provide!