+ Reply to Thread
Results 1 to 3 of 3

How to delete empty wells?

  1. #1
    Registered User
    Join Date
    03-17-2010
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    1

    How to delete empty wells?

    Hi,
    I've had to import data from a text file, that has imported in the following format (with each dot representing an empty well):
    A1.x..y
    A2.x....y
    A3.x......y
    A4.x........y

    etc etc.

    I have many of these files, going down 100 wells each, each with a value for x and y. Each y value is one cell down and two across from the previous ones. This rapidly gets silly (the last y value is in column GT!) when trying to manually delete the empty wells so that x and y end up next to each other. In my old version of excel, I would have bitten the bullet and recorded a macro doing it for one sheet so i could then just apply the macro to all the other sheets that are in an identical format. However, Microsoft decided that recording your own macros wouldn't be allowed in 2008 , so I can't.

    Can anyone help me with some advice for how to delete the empty wells from the sheet?

    Thanks in advance
    J

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to delete empty wells?

    what was the delimiter when you imported it?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to delete empty wells?

    Try this after the import is done:

    1) Highlight all the data
    2) Press F5 (or Ctrl-G) and select Special > Blanks > OK
    3) Select Edit > Delete > Shift Cells Left > OK
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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