moving data to one row

  • Thread starter Thread starter stacie
  • Start date Start date
S

stacie

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?
 
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,
Can you break this down a little for me? Where do I put he information you
suggested?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top