[mso] Excel VBA Copy, Cut, Paste & Delete

Good Morning All,

I am looking for some help on a bit of a tricky situation.

Our general ledger system (not windows based) allows us to export data
into excel for further analysis and playing with. However, it doesn't
export data in the most user friendly manner.

If a purchase ledger clerk has had to use two lines in order to input an
invoice description for example, this will be imported as two lines.
This is problematic, because you can't sort the data without having to
first cutting the contents of the second line of the description and
pasting them on to the first line to create one line.

I need help with a code that will do the following on a highlighted
selection:

On every cell that has contents in it,

1) Look to the cell on either the left or the right of that cell.
2) If the cell either to the left or to the right is empty, this is an
indication that this is a second line of a description, following on
from the description in the cell above and therefore
3) Highlight contents of cell (By stepping into the cell), cut and paste
at the end of the contents in the cell above it {F2 & Ctrl V}.
4) Delete row that has been cut from as this is now blank.

Repeat this until it comes to a cell whose contents is blank meaning
that it has come to the end of the list, or do until end of the
selection.

I am using Excel 2003, and hope I have explained the problem ok, if not,
feel free to ask away.

Many thanks

Herbert

______________________________________________________________________
This e-mail, plus any files attached, may be confidential and is intended 
solely for the addressee.  Please contact the sender if you have received this 
message in error. We recommend that recipients virus check all e-mails and 
files received 

As a public sector Organisation, YPO may be required to disclose this email [or 
any response to it] under the Freedom of Information Act 2000, unless the 
information in it is covered by one of the exemptions in the Act.

For the full disclaimer please access http://www.ypo.co.uk/e-maild
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: