Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2014, 11:55 PM
excelledsoftware excelledsoftware is offline Run Script to remove carriage returns on certain columns Windows 7 64bit Run Script to remove carriage returns on certain columns Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

While it is on my mind I just though of 2 things you should do when you run this script the first time.
number1 open a new blank workbook and put this code into a module.


number2 try it on a folder with a few BACKED UP excel books in it.
Check the results and if everything looks good back up the intended folder and run it.
Reply With Quote
  #2  
Old 08-28-2014, 11:44 AM
ryanjohnsond@gmail.com ryanjohnsond@gmail.com is offline Run Script to remove carriage returns on certain columns Windows 8 Run Script to remove carriage returns on certain columns Office 2007
Novice
Run Script to remove carriage returns on certain columns
 
Join Date: Aug 2014
Posts: 18
ryanjohnsond@gmail.com is on a distinguished road
Default

Quote:
Originally Posted by excelledsoftware View Post
number1 open a new blank workbook and put this code into a module.
Should I save it as an Excel Macro-Enabled Workbook (.xlsm) file?

Quote:
Originally Posted by excelledsoftware View Post
While it is on my mind I just though of 2 things you should do when you run this script the first time.
number1 open a new blank workbook and put this code into a module.
number2 try it on a folder with a few BACKED UP excel books in it.
Check the results and if everything looks good back up the intended folder and run it.
It worked really well on all the files in the folder, but something I noticed... Apparently, there are carriage returns in unexpected places. It leaves double commas (,,).
Here is a screenshot from the results after your code ran. It shows where the double commas occurred.

Possible Solution:
Perhaps, at the end of your code you can check for double commas “,,” and remove the extra one?
E.G: your code could check for double commas, finds something like this: "2,3,,8" remove the extra comma, and the result would be "2,3,8"
Attached Images
File Type: png check-for-double-commas.png (21.1 KB, 18 views)

Last edited by ryanjohnsond@gmail.com; 08-28-2014 at 01:17 PM.
Reply With Quote
  #3  
Old 08-28-2014, 01:15 PM
ryanjohnsond@gmail.com ryanjohnsond@gmail.com is offline Run Script to remove carriage returns on certain columns Windows 8 Run Script to remove carriage returns on certain columns Office 2007
Novice
Run Script to remove carriage returns on certain columns
 
Join Date: Aug 2014
Posts: 18
ryanjohnsond@gmail.com is on a distinguished road
Default

Quote:
Originally Posted by excelledsoftware View Post
While it is on my mind I just though of 2 things you should do when you run this script the first time.
number1 open a new blank workbook and put this code into a module.
number2 try it on a folder with a few BACKED UP excel books in it.
Check the results and if everything looks good back up the intended folder and run it.
I think I did it correctly. I saved it as a Macro.xlsm, and ran it. For some reason the second folder, Column D didn't get properly changed. Weird.

Last edited by ryanjohnsond@gmail.com; 08-28-2014 at 03:32 PM.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Script to remove carriage returns on certain columns stop carriage return or enter key in a table Alaska1 Word 1 01-14-2013 08:48 AM
Run Script to remove carriage returns on certain columns Coding into a macro a carriage return sinbad Word VBA 6 02-27-2012 03:51 AM
Run Script to remove carriage returns on certain columns Paragraph (carriage) return font size revrossreddick Word 2 12-28-2011 01:33 PM
Carriage Return Help UCHelp Word 1 04-04-2010 10:11 PM
Run Script to remove carriage returns on certain columns Table of contents, remove spacing and put in 2 columns - need help urgently! nam085 Word 1 03-04-2010 08:00 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:47 AM.


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