+ Reply to Thread
Results 1 to 4 of 4

insert offset blank cell

  1. #1
    Registered User
    Join Date
    09-22-2010
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    2

    insert offset blank cell

    I have a list of names in rows. Some rows use three columns, like for James Earl Jones. Others use two columns, like for Tom Jones. And some use four columns, like for Oliver Wendell David Holmes.

    I want to be able to sort by last name, so I believe I need all the rows positioned with the last names in the right-most column, which I would then sort on.

    To get the names lined up on the right-hand column, I think I need a macro that looks at the right-most cell. If the cell is blank, then the macro would insert a blank cell X columns to the left, moving the cells with names to the right. The macro could be run repetitively until there were no blank cells on the right side.

    Help?

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: insert offset blank cell

    Hi

    Here goes.

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    09-22-2010
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: insert offset blank cell

    Thanks. It ran, but no cells moved. Oh, well.

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: insert offset blank cell

    moved plenty when I ran it. The data is expected to be in columns A through D.

    Here is a version that moves just the last populated cell to column D, so all first names stay in column A

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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