Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 138
Default How can I combine 2 columns of data into 1 and format it as follow

I have column A Part numbers and column B corresponding price for the part
number in A. I need to create a new column that would be formatted as
follows:
A1
B1
A2
B2
A3
B3

The A data needs to be formatted as "special" and the B column is a four
decimal number. When I try to copy and paste I do not capture the contents of
every set but rather every other one. Can I write a formula to capture each
consecutive line of data as alternating values in the same column?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default How can I combine 2 columns of data into 1 and format it as follow

try this. UNcomment next to last line to delete col B
Sub aligncolumnsasone()
mc = 1
On Error Resume Next
For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1
Cells(i, mc + 1).Copy
Cells(i + 1, mc).Insert
Next i
'columns(mc+1).delete
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jonathan" wrote in message
...
I have column A Part numbers and column B corresponding price for the part
number in A. I need to create a new column that would be formatted as
follows:
A1
B1
A2
B2
A3
B3

The A data needs to be formatted as "special" and the B column is a four
decimal number. When I try to copy and paste I do not capture the contents
of
every set but rather every other one. Can I write a formula to capture
each
consecutive line of data as alternating values in the same column?


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
Combine columns of data into one Naruto Charts and Charting in Excel 2 December 17th 07 03:53 PM
Combine data in columns from 2 tabs Cong Nguyen Excel Discussion (Misc queries) 3 October 23rd 07 09:42 PM
How can I combine multiple columns of data into 1 column? Frank New Users to Excel 1 January 17th 07 07:37 PM
How to combine data from two columns into one column? dcnguyen Excel Worksheet Functions 3 January 8th 06 11:40 PM
How do I get the color format to follow the data when referencing. Color formatting while referencing Excel Worksheet Functions 0 August 17th 05 08:40 PM


All times are GMT +1. The time now is 09:30 PM.

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"