+ Reply to Thread
Results 1 to 2 of 2

Move data left into empty cell

  1. #1
    Registered User
    Join Date
    06-15-2009
    Location
    Isle of Man
    MS-Off Ver
    Excel 2003
    Posts
    27

    Move data left into empty cell

    This may be a repost as PC crashed whilst posting.
    Anyway, here goes again...
    Product details are in an Excel table.
    Col "A" holds product names; "B" product number; "C" onwards is other data relating to the product but any of the data (from "C" onwards) on any row can be deleted when it is no longer relevant.
    When a cell value is deleted, I want all other cell values to the right of the deleted cell on the same row to move one cell to the left. This will 'fill' the empty cell and ensure there's no wasted space in the table.

    Would it be feasible to start at "B" and move one cell at a time to the right until a blank cell is found, move the data in the next cell to the blank one and keep looping until the next blank cell is found (I.e. the end of the row)?

    What seemed like a straightforward request is proving to be a pain!

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Move data left into empty cell

    activesheet.usedrange.rows(1).specialcells(xlCellTypeBlanks).address, will give you the address of the blank cell.
    Then use something similar to activecell.Delete xlLeft, but for that cell.

    Not in excel at mo.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Move data to empty left cell
    By JawadAhmed in forum Excel General
    Replies: 5
    Last Post: 05-04-2020, 05:53 PM
  2. [SOLVED] Move Cell value left if next cell is empty.
    By fokeiro in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-29-2012, 12:40 PM
  3. Need to move data from cell to the left
    By eddielong in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-01-2011, 11:10 AM
  4. Macro to move all values to left if the cell is empty
    By Blake 7 in forum Excel General
    Replies: 6
    Last Post: 05-05-2011, 06:28 AM
  5. cell data move to left
    By lapot in forum Excel General
    Replies: 3
    Last Post: 05-18-2007, 08:04 PM

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