Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2014, 12:33 AM
Shinaj Shinaj is offline VBA code to select one word from a text in a cell and place that word in next cell Windows Vista VBA code to select one word from a text in a cell and place that word in next cell Office 2010 32bit
Novice
VBA code to select one word from a text in a cell and place that word in next cell
 
Join Date: May 2014
Posts: 3
Shinaj is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 05-01-2014, 06:56 AM
gebobs gebobs is offline VBA code to select one word from a text in a cell and place that word in next cell Windows 7 64bit VBA code to select one word from a text in a cell and place that word in next cell Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

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?
Reply With Quote
  #3  
Old 05-01-2014, 01:50 PM
Shinaj Shinaj is offline VBA code to select one word from a text in a cell and place that word in next cell Windows Vista VBA code to select one word from a text in a cell and place that word in next cell Office 2010 32bit
Novice
VBA code to select one word from a text in a cell and place that word in next cell
 
Join Date: May 2014
Posts: 3
Shinaj is on a distinguished road
Default

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.
Attached Files
File Type: xlsx Book1.xlsx (9.8 KB, 9 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code to select one word from a text in a cell and place that word in next cell 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
VBA code to select one word from a text in a cell and place that word in next cell Table with text that flows from cell to cell hwrigley Word Tables 7 02-18-2014 02:59 AM
VBA code to select one word from a text in a cell and place that word in next cell 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft