+ Reply to Thread
Results 1 to 13 of 13

How to delete every other cell in column

  1. #1
    Registered User
    Join Date
    09-16-2014
    Location
    southern New Jersey
    MS-Off Ver
    Office 2003
    Posts
    6

    How to delete every other cell in column

    Hi everyone,

    I started using Excel for the first time last night, so I am about as much a newbie as one can be. However, I have a background in math, with some programming, so I understand concepts but don't know any of the particulars of Excel. I don't know if this is an easy problem or not; I have searched online but have not found a solution, and I thank you for any help you can give me.

    I have a very simple spreadsheet in Excel 2003. I attach a short example. It has two columns, and all I want to do is delete the odd-numbered cells in column B, but not the whole row. I want to end up with A1 and B2 in the first row, A2 and B4 in the second row, and so on. The real data I will be working with will be 500 to 2000 rows long, so it won't be something I can do by hand.

    Thank you,
    Robin
    Attached Files Attached Files

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How to delete every other cell in column

    Using your posted workbook
    Here's one approach
    ...(it's too bad the instructions are so long...the process is actually very easy)

    • Insert a blank row above your data
    • Enter these headings
    A1: ID
    B1: Name
    C1: Flag

    • Enter this formula in C2 and copy down as far as you need
    Please Login or Register  to view this content.
    • Select all of the data and the headings
    • Data.Filter.Filter
    • Click the Flag dropdown and select: 0 (now the non-attorney rows are visible)
    • Select all of the visible data cells UNDER the Name heading
    • Press the DELETE key (to clear the contents of the visible cells)
    • Remove the Flag filter (to display all records)
    • Click the Col_B heading (to select the entire column)
    • Press F5...Click Special_Cells...Check: Blanks...Click: OK
    • Edit.Delete...Check: Shift cells up
    Done

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    09-16-2014
    Location
    southern New Jersey
    MS-Off Ver
    Office 2003
    Posts
    6

    Re: How to delete every other cell in column

    Ron, thank you so much! I should be able to handle this, but I have one question to start off. I have seen this sort of method used in my online searching, but I don't know how to copy a formula down a column. I paste it into C2 and it evaluates to 0, but all I can think of to do at that point is to drag the mouse cursor, which highlights the rest of the column but does not appear to insert the formula.

    Thanks again,
    Robin

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How to delete every other cell in column

    Here's another approach...assuming that the word "Attorney" is not included in the cells you want to delete.
    - This can be done with less steps...but you indicated that you're new to Excel)
    - I used keyboard shortcuts because I can't remember some the the Excel 2003 menu command locations)

    • Select Col_B
    • CTRL+F...to open the Find window
    ...Find what: attorney
    ...Click: Find All

    While that window is still OPEN
    ...CTRL+A...to select ALL matched cells

    • CTRL+C...to copy those cells
    • Select cell D2
    • Press ENTER...to paste the copied cells off to the right
    • Select Col_D...the entire column
    • CTRL+X...to "cut" that column
    • Select Col_B...press ENTER (to move the Col_D cells right over the Col_C cells)
    Done

    Does that help?

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How to delete every other cell in column

    To use the mouse to drag a formula down...
    • Select the source cell for the formula
    • Put the mouse cursor over the little black box in thebottom-right corner of the source cell
    (the cursor will turn into a small "x")
    • Hold down the left mouse button
    ...Drag the formula down as far as you need.
    • Release the left mouse button

    Does that help?

  6. #6
    Registered User
    Join Date
    04-01-2008
    Location
    Houston
    MS-Off Ver
    Office 365
    Posts
    85

    Re: How to delete every other cell in column

    Hi Cmplxgal and welcome to the forum.

    Just to add what Ron has shown above. There are two easy ways to paste a formula all the way down your data espcially when there isn't any blanks in the cells to the left of your formula as it sounds. After you enter the formula you will see the bold box around the cell, in the bottom right corner of the cell you will see a little square. Once you scroll over this black square your mouse will change to a bold "+" sign. You can double click this and it will copy your formula down to the end or when it finds a blank cell to the left. Also you can use CTRL+C as Ron mentions and then select CTRL+SHIFT+END which will select your row to the end of your range where now you can hit enter to paste your data.

    Hope this helps,
    Cullen

  7. #7
    Registered User
    Join Date
    04-01-2008
    Location
    Houston
    MS-Off Ver
    Office 365
    Posts
    85

    Re: How to delete every other cell in column

    Your too quick Ron.

  8. #8
    Registered User
    Join Date
    09-16-2014
    Location
    southern New Jersey
    MS-Off Ver
    Office 2003
    Posts
    6

    Re: How to delete every other cell in column

    Yes! This does it, and in a clever way. Thank you, Ron!

    --Robin

  9. #9
    Registered User
    Join Date
    09-16-2014
    Location
    southern New Jersey
    MS-Off Ver
    Office 2003
    Posts
    6

    Re: How to delete every other cell in column

    I'm not sure if I should top-post or bottom-post when quoting, but thank you Cullen8! The double-click worked. You all are the best.

    --Robin

    Quote Originally Posted by Cullen8 View Post
    Hi Cmplxgal and welcome to the forum.

    Just to add what Ron has shown above. There are two easy ways to paste a formula all the way down your data espcially when there isn't any blanks in the cells to the left of your formula as it sounds. After you enter the formula you will see the bold box around the cell, in the bottom right corner of the cell you will see a little square. Once you scroll over this black square your mouse will change to a bold "+" sign. You can double click this and it will copy your formula down to the end or when it finds a blank cell to the left. Also you can use CTRL+C as Ron mentions and then select CTRL+SHIFT+END which will select your row to the end of your range where now you can hit enter to paste your data.

    Hope this helps,
    Cullen

  10. #10
    Registered User
    Join Date
    09-16-2014
    Location
    southern New Jersey
    MS-Off Ver
    Office 2003
    Posts
    6

    Re: How to delete every other cell in column

    Ron, I was talking about the second method. Thanks again! I will change the thread status to "solved," assuming I see how to do that.

    --Robin

    Quote Originally Posted by cmplxgal View Post
    Yes! This does it, and in a clever way. Thank you, Ron!

    --Robin

  11. #11
    Registered User
    Join Date
    09-16-2014
    Location
    southern New Jersey
    MS-Off Ver
    Office 2003
    Posts
    6

    Re: How to delete every other cell in column

    Ron, I wanted to let you know that ultimately I had to use your first suggestion, and it worked like a charm. Thanks again (and to Cullen for the hint on copying the formula). My real-world data wasn't as consistent as my test file suggested, so that the second method (which relies on all the cells to be moved/saved having the word "attorney" in them) failed because a few of the cells to be saved didn't have "attorney." But all is well, and this experience has encouraged me to learn more about Excel.

    --Robin

    Quote Originally Posted by Ron Coderre View Post
    Here's another approach...assuming that the word "Attorney" is not included in the cells you want to delete.
    - This can be done with less steps...but you indicated that you're new to Excel)
    - I used keyboard shortcuts because I can't remember some the the Excel 2003 menu command locations)

    Does that help?

  12. #12
    Registered User
    Join Date
    01-27-2017
    Location
    Ventura, CA
    MS-Off Ver
    Windows 98
    Posts
    1

    Re: How to delete every other cell in column

    Ron: I have been trying to solve this problem for 90m, and your instructions were fantastic. I am a rookie excel user, and your assist was the best event of my work day. Thank you!

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to delete every other cell in column

    calcoast, thank you for your feedback, always appreciated
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Run Macro Automatically When delete row , changes cell,delete column
    By elevisse in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2012, 07:42 AM
  2. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel General
    Replies: 5
    Last Post: 04-06-2012, 12:02 PM
  3. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-06-2012, 11:19 AM
  4. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-06-2012, 11:18 AM
  5. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-06-2012, 11:13 AM

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