juancarlos1
New Member
- Joined
- Sep 22, 2021
- Messages
- 8
- Office Version
- 365
Hi! First time posting here!
I have been struggling with a very specific and probably weird issue that I am not sure of having a solution.
The problem is related to text that is initially in word documents.
Likewise, I have today asked for advice in a forum connected to Word VBA:
www.office-forums.com/whats-new/posts/657604/
Meanwhile, I am thinking that perhaps it is better to paste the text I need to work on to Excel so that it is easier to manipulate
From what I have tried and tried a lot, coding in Word is kind of hellish in comparison, so exporting the text to excel seems to be the best.
Unfortunately for this specific problem, I am not having much more success in Excel.
I will expose the issue:
I have text sections in which a few words are bolded. The bolded words depend on the searched category.
For example, if I want to check fruits, and just fruits will already be bolded in the middle of the text (Solutions already in place).
Now with this text section needs further processing.
///Raw text example contained in cell A1:
//Final text result expected to be included in cell A2:
//Final text result expected to be included in cell A3:
Actions required:
1-To use only the selected text section as the range so it doesn't affect other text sections in the document;
2-Trim spaces, including not leaving a space at the end of the sentences;
3-Remove paragraphs if existing;
4-Uppercase all bolded characters
5-List the bolded words, in a separate cell from the initial result cell, separated by a comma "," and remove duplicates just from this created text section;
6-Unbold the initially selected text from both result cells.
Can someone please advise if this is possible? Are there some tips or extra steps that I can follow to solve this conundrum?
I have been struggling with a very specific and probably weird issue that I am not sure of having a solution.
The problem is related to text that is initially in word documents.
Likewise, I have today asked for advice in a forum connected to Word VBA:
www.office-forums.com/whats-new/posts/657604/
Meanwhile, I am thinking that perhaps it is better to paste the text I need to work on to Excel so that it is easier to manipulate
From what I have tried and tried a lot, coding in Word is kind of hellish in comparison, so exporting the text to excel seems to be the best.
Unfortunately for this specific problem, I am not having much more success in Excel.
I will expose the issue:
I have text sections in which a few words are bolded. The bolded words depend on the searched category.
For example, if I want to check fruits, and just fruits will already be bolded in the middle of the text (Solutions already in place).
Now with this text section needs further processing.
///Raw text example contained in cell A1:
Request ref#14587** include Banana, celery, bread, melon, base, bulb, Cucumber, grapes chocolate, cheese mango, mango cat food, carrot, and others several listed in subsequent ref. |
//Final text result expected to be included in cell A2:
Request ref#14587** include BANANA, celery, bread, MELON, base, bulb, Cucumber, GRAPES chocolate, cheese MANGO, MANGO cat food, carrot, MELON, and others several listed in subsequent ref. |
//Final text result expected to be included in cell A3:
BANANA, MELON, GRAPES, MANGO |
Actions required:
1-To use only the selected text section as the range so it doesn't affect other text sections in the document;
2-Trim spaces, including not leaving a space at the end of the sentences;
3-Remove paragraphs if existing;
4-Uppercase all bolded characters
5-List the bolded words, in a separate cell from the initial result cell, separated by a comma "," and remove duplicates just from this created text section;
6-Unbold the initially selected text from both result cells.
Can someone please advise if this is possible? Are there some tips or extra steps that I can follow to solve this conundrum?