+ Reply to Thread
Results 1 to 4 of 4

Auto highlight cells in a column and move it to the bottom of another cell with a macro?

  1. #1
    Registered User
    Join Date
    09-17-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    14

    Auto highlight cells in a column and move it to the bottom of another cell with a macro?

    I have the following

    Column A
    Title Alpha
    A
    B
    C
    D
    E
    F

    Column B
    Title Beta
    G
    H
    I

    Is it possible to move Column B (minus "Title Beta") to the bottom of column A? So it become:

    Column A
    Title Alpha
    A
    B
    C
    D
    E
    F
    G
    H
    I

    The data in Column A and Column B are dynamic and can increase or decrease.

    Cheers

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Auto highlight cells in a column and move it to the bottom of another cell with a macr

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-17-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Auto highlight cells in a column and move it to the bottom of another cell with a macr

    Sorry for the late reply, been on holiday.

    Can someone explain to me the purpose of the following in BOLD

    lr = Cells(Rows.Count, 2).End(xlUp).Row

    Range("B2:B" & lr).Cut Range("A" & Rows.Count).End(3)(2)

    Thanks

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Auto highlight cells in a column and move it to the bottom of another cell with a macr

    lr = Cells(Rows.Count, 2).End(xlUp).Row

    The 2 stands for the Column number or Column "B"

    Range("B2:B" & lr).Cut Range("A" & Rows.Count).End(3)(2)

    The (3) same as (xlUp), (2) same as Offset(1).

+ 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