Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Shifting information from multiple columns to one column

I made a macro that copys the information foorm mutiple columns and pastes
the information into a new sheet. The information can be in column:
"A","B","C" or "D" as shown. Is there a way to shift all of the information
to column "A"?

I have this now: (Info put into multiple columns)
A B C D
Info1
Info2
Info3
Info4
Info5

Desired Result:(Info shifted to column "A")

A B C D
Info1
Info2
Info3
Info4
Info5

Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Shifting information from multiple columns to one column


U¿ytkownik "Elceller in distress"
napisa³ w wiadomo¶ci
...
I made a macro that copys the information foorm mutiple columns and pastes
the information into a new sheet. The information can be in column:
"A","B","C" or "D" as shown. Is there a way to shift all of the

information
to column "A"?

I have this now: (Info put into multiple columns)
A B C D
Info1
Info2
Info3
Info4
Info5

Desired Result:(Info shifted to column "A")

A B C D
Info1
Info2
Info3
Info4
Info5

Thanks for your help


try
Sub fill()
For Each cell In Range("a1:a" & ActiveSheet.UsedRange.Rows.Count)
If cell.Value = "" Then
cell.Value = cell.End(xlToRight).Value
cell.End(xlToRight).ClearContents
End If
Next
End Sub
mcg


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Shifting information from multiple columns to one column

Thanks "It Worked!"

"Gazeta" wrote:


U¿ytkownik "Elceller in distress"
napisa³ w wiadomo¶ci
...
I made a macro that copys the information foorm mutiple columns and pastes
the information into a new sheet. The information can be in column:
"A","B","C" or "D" as shown. Is there a way to shift all of the

information
to column "A"?

I have this now: (Info put into multiple columns)
A B C D
Info1
Info2
Info3
Info4
Info5

Desired Result:(Info shifted to column "A")

A B C D
Info1
Info2
Info3
Info4
Info5

Thanks for your help


try
Sub fill()
For Each cell In Range("a1:a" & ActiveSheet.UsedRange.Rows.Count)
If cell.Value = "" Then
cell.Value = cell.End(xlToRight).Value
cell.End(xlToRight).ClearContents
End If
Next
End Sub
mcg



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
Multiple if statements based on two columns of information Elizabeth Excel Worksheet Functions 2 July 25th 08 07:51 PM
Sorting multiple columns and maintaining grouping of information TPSKAM Excel Discussion (Misc queries) 2 December 13th 07 03:31 PM
Time-shifting information Amanda Excel Worksheet Functions 1 September 24th 07 04:23 PM
Shifting rows into columns biggg_fish Excel Discussion (Misc queries) 2 March 28th 07 03:13 AM
Columns Shifting on Import of Data Carroll[_2_] Excel Programming 1 January 14th 05 04:02 PM


All times are GMT +1. The time now is 03:19 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"