LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Moving text from a line to a new line based on a condition

I've been trying to do this with a macro but I think VB is needed and I'm
"not" a VB developer so I really hope one of you can help me out. This is the
last major thing I need to make this thing work.

I have records with columns Group, FName, LName, and Combined.
If there are more than 30 characters in the Combined field, I need to move
the full names to the next line, remove the "^" at the end or beginning of
the line (depending on what was moved) and copy the other fields in the
original line. Uploading the list otherwise makes the program bomb for some
reason. I hope someone out there can help me.

group name combined
marketing mjagger mjagger^rthomas^xbono
marketing rthomas mjagger^rthomas^xbono
marketing xbono mjagger^rthomas^xbono
accounting rcharles rcharles^jbrown
accounting jbrown rcharles^jbrown
hr jmayer jmayer
it jjohnson
jjohnson^bdylan^joplin^jfoggerty^braitt
it bdylan
jjohnson^bdylan^joplin^jfoggerty^braitt
it jjoplin
jjohnson^bdylan^joplin^jfoggerty^braitt
it jfoggerty
jjohnson^bdylan^joplin^jfoggerty^braitt
it braitt
jjohnson^bdylan^joplin^jfoggerty^braitt

The example above would become:

group name combined
marketing mjagger mjagger^rthomas^xbono
marketing rthomas mjagger^rthomas^xbono
marketing xbono mjagger^rthomas^xbono
accounting rcharles rcharles^jbrown
accounting jbrown rcharles^jbrown
hr jmayer jmayer
it jjohnson jjohnson^bdylan^joplin
it jjohnson jfoggerty^braitt
it bdylan jjohnson^bdylan^joplin
it bdylan jfoggerty^braitt
it jjoplin jjohnson^bdylan^joplin
it jjoplin jfoggerty^braitt
it jfoggerty jjohnson^bdylan^joplin
it jfoggerty jfoggerty^braitt
it braitt jjohnson^bdylan^joplin
it braitt jfoggerty^braitt


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? No Name Excel Worksheet Functions 7 October 7th 09 11:10 AM
How to change line chart color based on condition like + and -. egii Charts and Charting in Excel 1 May 8th 09 09:06 AM
how to delete an excel line based on a condition The cricket Excel Worksheet Functions 2 October 7th 08 12:04 PM
average Line created in an existing line graph- based on one cell Melanie Charts and Charting in Excel 2 December 27th 07 09:14 PM
A 2 line text showing up in the Cell in Excel prints in 1 line Danny Excel Discussion (Misc queries) 6 July 12th 05 08:47 PM


All times are GMT +1. The time now is 07:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"