+ Reply to Thread
Results 1 to 8 of 8

Select Entire Sheet and Delete all Cells Except Column A

  1. #1
    Registered User
    Join Date
    03-01-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Select Entire Sheet and Delete all Cells Except Column A

    I am stumped. All I want to do is have the user be able to select entire sheet or even rows and hit the delete button to erase all contents of cells except column A. I tried the lock and protect sheet method but that's not what they want. The would like to specifically select the row and delete all contents of row except column A. Can you fine folks help me out? This is almost embarrassing to ask because it seems to be something fairly simple; however, not simple enough for me I suppose.

    Thank you in advance for your help.

    Sheffcourt

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Select Entire Sheet and Delete all Cells Except Column A

    Is the data contiguous across the row (i.e. no blanks) ? If so, you can select cell B1 (for example), then hold down the <Shift> key, press the <End> key once followed by <right-arrow>, then release <Shift> (which will have highlighted all the data across from B1), then press the <Delete> key.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-01-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Select Entire Sheet and Delete all Cells Except Column A

    No - I've attached the simple spreadsheet. Column A will never change so they want to use this as a template and for the person to be able to select the entire sheet or select all rows and hit the keyboard delete button and have only column A intact. I don't understand why they can't just select column B and highlight over and delete, but for some reason they would like to be able to do it like the way I described. I have ASAP Utilities and thought it would be a simple process but I can't find anything to help me isolate that one column the way they want.
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Select Entire Sheet and Delete all Cells Except Column A

    First of all, select cell A63 and click on the Merge and Centre icon and on Unmerge cells (You should also unmerge any other cells in other sheets). Then, while holding down the CTRL key, press the <End> key and then release <Ctrl> - this will take the cursor to the last-used cell (H469 on sheet HSB & QTs). Hold down the <Shift> key, and do CTRL-Home - this will highlight all the used cells in the sheet - then press the arrow-right button, and then release <Shift>. This has now highlighted all the used cells from B2 onwards. You can then press the <Delete> key to remove the contents.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    03-01-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Select Entire Sheet and Delete all Cells Except Column A

    I'm sorry Pete - I must not be doing a great job of explaining what I need. These guys want to be able to select a row and hit delete and erase all the contents except the cell contents in column A. They don't want to just go to column B and hold shift and highlight over and delete(and I don't understand why they can't just do that) but they want to be able to select the row and hit delete and have all contents on the row deleted except column A. I apologize that I wasnt more clear.

  6. #6
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Select Entire Sheet and Delete all Cells Except Column A

    Highlight col A. Format cells, protection, make sure locked is checked.
    Choose all other columns, format cells, and unchecked locked in the same manner.
    Right click the tab, view code, make sure the properties window is visible in the lower left
    In the enable selection field, , change the selection to: 1 - xUnlockedCells Close the VBA explorer window.

    Protect the worksheet. This will prevent users from messing with col A.

    Hope it helps.
    Pete

  7. #7
    Registered User
    Join Date
    03-01-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Select Entire Sheet and Delete all Cells Except Column A

    Hi Pete,

    I'm so sorry for late reply. I didn't receive an email showing you had replied. I did use your instructions above. This is almost what I need although they want to be able to select the rows and delete the content except column A. I sent them the one per your instructions and told them I was still working on it but I don't know if it's even possible to do what they are asking at this point.

    Do you know how to have the file just like you instructed above but for them to be able to select rows or select entire sheet while keeping Column A content protected? I really appreciate all of your help and time with your replies.

  8. #8
    Registered User
    Join Date
    03-01-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Select Entire Sheet and Delete all Cells Except Column A

    I uploaded the spreadsheet after I applied your instructions. I'm unable to select rows or entire spreadsheet and hit delete which is what they would like to do.Protected_Gen Switch Stock.xls

+ 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. select an entire column except the merged cells
    By alexcrofut in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2014, 04:12 PM
  2. [SOLVED] Select column C and delete blank entire rows Till C300
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2014, 08:55 AM
  3. delete entire row if cells in column D contain certain value
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-15-2012, 12:10 PM
  4. Delete entire column if all cells in a certain range are empty
    By Andula in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-26-2011, 06:33 AM
  5. [SOLVED] Easiest way to delete blank cells in column (not entire row)
    By sramsey in forum Excel General
    Replies: 4
    Last Post: 02-16-2006, 12:30 PM

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