#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 542
Default VBA to merge cells

The format that another application spits out is one that I would like to
make user friendly. Here is an example of what I am looking at:
WELL: 5122110000 3096971.9998
PICK: GRETA
**Each line of data is in one cell

In my normal file I have anywhere between 400 to 2000 rows of data. I would
like something that will take the lines that have "PICK:" and place all that
information on the row above it and paste that line of data after the end of
the data in the row "WELL:"

So what this line would look like would be:
WELL: 5122110000 3096971.9998 PICK: GRETA

When it puts the line with "PICK:" it would be great if there was a space
between the last value in the line with the "WELL:" and the P in "PICK:"

Thanks for the help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default VBA to merge cells

So you want all that stuff in a single cell?

If yes, then put this in B1:
=A1&" "&A2
Put this in B2:
=na()

Select B1:B2 and drag down as far as you need.

Select column B
Edit|Copy
Edit|Paste special|Values

With column B still selected
Edit|Goto (or hit F5)|Special|check Constants and errors (uncheck the rest)

Rightclick on any of those errors
Delete|shift cells up



James wrote:

The format that another application spits out is one that I would like to
make user friendly. Here is an example of what I am looking at:
WELL: 5122110000 3096971.9998
PICK: GRETA
**Each line of data is in one cell

In my normal file I have anywhere between 400 to 2000 rows of data. I would
like something that will take the lines that have "PICK:" and place all that
information on the row above it and paste that line of data after the end of
the data in the row "WELL:"

So what this line would look like would be:
WELL: 5122110000 3096971.9998 PICK: GRETA

When it puts the line with "PICK:" it would be great if there was a space
between the last value in the line with the "WELL:" and the P in "PICK:"

Thanks for the help


--

Dave Peterson
Reply
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
Automatically merge mulitiple cells to one cells Edward Wang Excel Worksheet Functions 5 September 15th 09 07:56 PM
how do I merge cells into one then delete the original cells? LLR Excel Worksheet Functions 2 March 7th 08 10:59 PM
Merge of cells Heine Excel Worksheet Functions 0 June 1st 07 03:23 PM
Merge Two Cells sabegirl Excel Discussion (Misc queries) 1 May 19th 06 04:49 AM
How do I merge cells in Excel, like just 2 cells to make one big . chattacat Excel Discussion (Misc queries) 2 January 19th 05 04:25 PM


All times are GMT +1. The time now is 06:36 PM.

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

About Us

"It's about Microsoft Excel"