skydivetom
New Member
- Joined
- Oct 26, 2017
- Messages
- 5
Experts:
I need some assistance with either a) creating a custom-formula or b) using some VBA or macro which will extract all *entire* words that include an underscore ("_") in a cell.
The cell values include carriage returns as well as duplicate occurrences of a particular keyword. Below shows and example of the raw data, the output of the keywords (w/ duplicates) as well as the string output without duplicates.
Ideally, I would like to get to the output of the "2nd string" (w/o duplicates). Also, each "found keyword" should be separated by a semi-colon (or comma).
My question: How can the output below accomplished via a formula or VBA? I have included a sample XLS containing 3 different example strings (with different lengths) and their associated outputs.
I need some assistance with either a) creating a custom-formula or b) using some VBA or macro which will extract all *entire* words that include an underscore ("_") in a cell.
The cell values include carriage returns as well as duplicate occurrences of a particular keyword. Below shows and example of the raw data, the output of the keywords (w/ duplicates) as well as the string output without duplicates.
Ideally, I would like to get to the output of the "2nd string" (w/o duplicates). Also, each "found keyword" should be separated by a semi-colon (or comma).
My question: How can the output below accomplished via a formula or VBA? I have included a sample XLS containing 3 different example strings (with different lengths) and their associated outputs.
Code:
Raw Data
=========
SELECT DISTINCT
155 AS sort_number,
00 AS foreign_key,
'one_liner' AS field_name,
'Y' AS is_null
FROM
mishap
WHERE
(mshp_oneliner IS NULL AND mshp_id = plForeignKey)
1st string output (with duplicates)
===================================
sort_number; foreign_key; one_liner; field_name; is_null; mshp_oneliner; mshp_id; foreign_key
2nd string output (without duplicates)
======================================
sort_number; foreign_key; one_liner; field_name; is_null; mshp_oneliner; mshp_id