+ Reply to Thread
Results 1 to 3 of 3

Shifting information from multiple columns to one column

  1. #1
    Elceller in distress
    Guest

    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 ResultInfo shifted to column "A")

    A B C D
    Info1
    Info2
    Info3
    Info4
    Info5

    Thanks for your help

  2. #2
    Gazeta
    Guest

    Re: Shifting information from multiple columns to one column


    Użytkownik "Elceller in distress"
    <Elcellerindistress@discussions.microsoft.com> napisał w wiadomości
    news:5662773B-2A99-42CD-9B89-189A3156F841@microsoft.com...
    > 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 ResultInfo 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. #3
    Elceller in distress
    Guest

    Re: Shifting information from multiple columns to one column

    Thanks "It Worked!"

    "Gazeta" wrote:

    >
    > UÂżytkownik "Elceller in distress"
    > <Elcellerindistress@discussions.microsoft.com> napisaÂł w wiadomoÂści
    > news:5662773B-2A99-42CD-9B89-189A3156F841@microsoft.com...
    > > 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 ResultInfo 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1