Shifting information from multiple columns to one column

G

Guest

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
 
G

Gazeta

U¿ytkownik "Elceller in distress"
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
 
G

Guest

Thanks "It Worked!"

Gazeta said:
U¿ytkownik "Elceller in distress"


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
 

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

Top