|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
VBA code to select one word from a text in a cell and place that word in next cell
I am new to VBA. I want a VBA code that will pick particular words from one or more sentences and place them in adjacent cells.
Eg) if i have the following sentence in cell A1 'I like coding in Excel VBA' and following sentence in cell A2 'I am working on a Project' I am looking for a code that will pick the word 'Excel' from the first sentence and place it in cell B1 and pick the word 'Project' from the 2nd sentence and place it in cell B2. Please help. |
#2
|
|||
|
|||
This should be in the Excel Programming forum. But just out of curiosity, why those particular words? That is, is it picking words by position, length, capitalization or what?
|
#3
|
|||
|
|||
It needs to pick the word by its look not by position, length etc..
I have uploaded a speadsheet that has an example. I need to search words like red, Blue, Marble, Sunday from the sentences mentioned in column B and if any word is present in any of these sentences then that word should appear against that sentence in column C, as mentioned in the attached file. I found only conditional formatting option in Excel programming forum but no VBA code. Conditional formatting only highlights the work, it doesnt pick it and place in the adjacent cell. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA code for Microsoft Word macro — select text and insert footnote | ndnd | Word VBA | 10 | 01-06-2015 01:47 PM |
Search cell text from Excel into ms-word | ShailShin | Word VBA | 1 | 04-21-2014 02:12 AM |
Table with text that flows from cell to cell | hwrigley | Word Tables | 7 | 02-18-2014 02:59 AM |
How to input the text of a cell into another cell automatically ? | Juliet | Excel | 1 | 03-15-2013 03:25 AM |
Auto-populate an MS Word table cell with text from a diff cell? | dreamrthts | Word Tables | 0 | 03-20-2009 01:49 PM |