Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the following:
Col #1 Col #2 Col #3 Z1 ZA ZM Z2 ZB ZN I want it to be in ONE column: Col #1 Z1 Z2 ZA ZB ZM ZN Can I automatically do this vs. manually cutting and pasting? Thanks in advance for any help! Cheryl |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Cheryl
This macro will do what you want. This macro operates with Columns A:C putting all in Column B and Column C into Column A along with what was in Column A to start. HTH Otto Sub ShiftData() Dim rColB As Range Dim rColC As Range Set rColB = Range("B1", Range("B" & Rows.Count).End(xlUp)) Set rColC = Range("C1", Range("C" & Rows.Count).End(xlUp)) rColB.Copy Range("A" & Rows.Count).End(xlUp).Offset(1) rColC.Copy Range("A" & Rows.Count).End(xlUp).Offset(1) Columns("B:B").ClearContents Columns("C:C").ClearContents End Sub "CherylH" wrote in message ... I have the following: Col #1 Col #2 Col #3 Z1 ZA ZM Z2 ZB ZN I want it to be in ONE column: Col #1 Z1 Z2 ZA ZB ZM ZN Can I automatically do this vs. manually cutting and pasting? Thanks in advance for any help! Cheryl |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Otto,
Many thanks! This worked perfectly! "Otto Moehrbach" wrote: Cheryl This macro will do what you want. This macro operates with Columns A:C putting all in Column B and Column C into Column A along with what was in Column A to start. HTH Otto Sub ShiftData() Dim rColB As Range Dim rColC As Range Set rColB = Range("B1", Range("B" & Rows.Count).End(xlUp)) Set rColC = Range("C1", Range("C" & Rows.Count).End(xlUp)) rColB.Copy Range("A" & Rows.Count).End(xlUp).Offset(1) rColC.Copy Range("A" & Rows.Count).End(xlUp).Offset(1) Columns("B:B").ClearContents Columns("C:C").ClearContents End Sub "CherylH" wrote in message ... I have the following: Col #1 Col #2 Col #3 Z1 ZA ZM Z2 ZB ZN I want it to be in ONE column: Col #1 Z1 Z2 ZA ZB ZM ZN Can I automatically do this vs. manually cutting and pasting? Thanks in advance for any help! Cheryl |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Multiple Columns, Paste Under a Single column | Excel Worksheet Functions | |||
Lookup all values within multiple columns and copy to new column | Excel Discussion (Misc queries) | |||
Trying to copy text from 4 columns into 1 column with HTML? | Excel Discussion (Misc queries) | |||
Trying to copy text from 4 columns into 1 column with HTML? | Excel Worksheet Functions | |||
text from one column into multiple columns | Excel Discussion (Misc queries) |