Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-08-2016, 06:05 AM
Sean_Needs_Help Sean_Needs_Help is offline Copying Certain Text From Numerous Cells using Macro Windows 10 Copying Certain Text From Numerous Cells using Macro Office 2016
Novice
Copying Certain Text From Numerous Cells using Macro
 
Join Date: Nov 2016
Posts: 2
Sean_Needs_Help is on a distinguished road
Default Copying Certain Text From Numerous Cells using Macro

Hi Guys,
This is probably the easiest fix in the world but I can't seem to find a good solution to this at the moment;
The issue I am having is that I need to create a database based on a scanned serial numbers, but only need certain information from these barcodes. An example of the kind of thing I am looking at;
Barcode: 41BLSTHOMAS9991987
From this Barcode i want to copy and paste the characters THOMAS and 1987 into Column B & C of that row. The barcode always has the same amount of characters and the characters are always in the same place (ie dates of birth will always be 4 characters long and will alway be the 15-18th characters).
Does anyone know any simple excel formula or VBA code that code do the above by any chance?



Thanks!
Reply With Quote
  #2  
Old 11-08-2016, 06:12 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Copying Certain Text From Numerous Cells using Macro Windows 7 64bit Copying Certain Text From Numerous Cells using Macro Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,767
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi
perhaps Data - Text to columns - Fixed width and set delimiters as needed
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 11-08-2016, 08:16 AM
Sean_Needs_Help Sean_Needs_Help is offline Copying Certain Text From Numerous Cells using Macro Windows 10 Copying Certain Text From Numerous Cells using Macro Office 2016
Novice
Copying Certain Text From Numerous Cells using Macro
 
Join Date: Nov 2016
Posts: 2
Sean_Needs_Help is on a distinguished road
Default

Thanks Pecoflyer, that works in a way but it makes it a bit awkward.
Is there any way to select a certain group of characters in a cell without splitting it up, in Vba it seems to know where these characters are but selecting a specified group doesn't seem to be an option.
Reply With Quote
  #4  
Old 11-08-2016, 04:39 PM
macropod's Avatar
macropod macropod is offline Copying Certain Text From Numerous Cells using Macro Windows 7 64bit Copying Certain Text From Numerous Cells using Macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Assuming the 999 after THOMAS is just padding (i.e. longer names would have fewer 9s; shorter names, more), you could use formulae such as:
=SUBSTITUTE(MID(A1,6,9),9,"")
=RIGHT(A1,4)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Certain Text From Numerous Cells using Macro Macro to delete text from cells with specific format Soenke Word VBA 4 09-01-2016 08:55 AM
Copying Certain Text From Numerous Cells using Macro Copying Same Value Between Two Cells rsrasc Excel Programming 3 02-29-2016 10:53 PM
Copying Certain Text From Numerous Cells using Macro Copying text into multiple cells at once BIMwit Word Tables 1 05-14-2015 09:50 PM
Copying text range of cells to different cells adds an extra line jpb103 Word VBA 2 07-23-2014 12:22 PM
Macro to Insert Text Into Cells Having Multiple Lines revans611 Excel Programming 4 10-24-2011 10:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:36 PM.


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