Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default moving data to one row

I have pasted data into an excel spreadsheet, but the data is on two
different lines ex:
A6530 COMPRESSION STOCKING BK18-30
A9900 2 PAIR $ 45.46
L3908 WHO, WRIST EXTENSION
A9900 1 EACH $ 11.81


I need all of the data on one line like this:
A6530 COMPRESSION STOCKING BK18-30 A9900 2 PAIR $ 45.46
L3908 WHO, WRIST EXTENSION A9900 1 EACH $ 11.81

Is there a way to do this in excel?
--
stacie
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default moving data to one row

Try this

Sub allonerow()
mc = "a"
For i = Cells(Rows.Count, mc).End(xlUp).row To 1 Step -2
Cells(i - 1, mc) = Cells(i - 1, mc) & " " & Cells(i, mc)
Rows(i).Delete
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"stacie" wrote in message
...
I have pasted data into an excel spreadsheet, but the data is on two
different lines ex:
A6530 COMPRESSION STOCKING BK18-30
A9900 2 PAIR $ 45.46
L3908 WHO, WRIST EXTENSION
A9900 1 EACH $ 11.81


I need all of the data on one line like this:
A6530 COMPRESSION STOCKING BK18-30 A9900 2 PAIR $ 45.46
L3908 WHO, WRIST EXTENSION A9900 1 EACH $
11.81

Is there a way to do this in excel?
--
stacie


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default moving data to one row

Don,
Can you break this down a little for me? Where do I put he information you
suggested?
--
stacie


"Don Guillett" wrote:

Try this

Sub allonerow()
mc = "a"
For i = Cells(Rows.Count, mc).End(xlUp).row To 1 Step -2
Cells(i - 1, mc) = Cells(i - 1, mc) & " " & Cells(i, mc)
Rows(i).Delete
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"stacie" wrote in message
...
I have pasted data into an excel spreadsheet, but the data is on two
different lines ex:
A6530 COMPRESSION STOCKING BK18-30
A9900 2 PAIR $ 45.46
L3908 WHO, WRIST EXTENSION
A9900 1 EACH $ 11.81


I need all of the data on one line like this:
A6530 COMPRESSION STOCKING BK18-30 A9900 2 PAIR $ 45.46
L3908 WHO, WRIST EXTENSION A9900 1 EACH $
11.81

Is there a way to do this in excel?
--
stacie



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default moving data to one row

press ALT+F11, then click on Insert, click Module
copy Don's code and paste into the empty Module's window
then select your last (bottom) cell in the worksheet
come back to Module and press F5
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
Moving a line chart data point revises data table value in Excel ' Ed Smith Charts and Charting in Excel 2 November 16th 12 01:03 PM
moving data to non autofarmatted book changes data- Why? Josh Excel Discussion (Misc queries) 3 March 10th 06 09:16 PM
moving data warrior26 Excel Discussion (Misc queries) 2 January 6th 06 02:16 PM
Moving data gbeard Excel Worksheet Functions 1 May 4th 05 09:02 PM
moving data in excel without deleting existing data jigna Excel Discussion (Misc queries) 1 January 30th 05 11:35 AM


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

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"