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
|