+ Reply to Thread
Results 1 to 12 of 12

I there a quick way to deselect all selections in all cells from dropdown lists?

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    I there a quick way to deselect all selections in all cells from dropdown lists?

    Hello Forum,
    I have a workbook with 2 sheets:
    a) Data Validation
    b) Part Number & QTY which has 6 drop down lists to select part numbers and QTY.
    Goals:
    1) A quick way to clear all selections by clicking “Deselect All” cell, instead of clicking individual cell to deselect it so it will go back to default.
    2) Clicking “Deselect Row X” cell to clear all selections in that row so it will go back to default.
    3) Is there a way to make my code shorter by nesting all the same conditions but different part number or columns (please see the VBA code)

    Please see file attached.

    Thank you so much for your help.

    Thup_98
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: I there a quick way to deselect all selections in all cells from dropdown lists?

    try this:
    1. Select any cell with Data Validation & then Press the F5 key.
    2. On the Go To Window, select "Special"
    3. On the Go To Special Window, select "Data Validation" and "Same"
    4. This should select all cells with similar Data Validation.
    5. Type NA and then press [Ctrl] + [Enter] to apply it to all selected cells.
    use record Macro to get a draft code, which can then be modified suitably.

  3. #3
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: I there a quick way to deselect all selections in all cells from dropdown lists?

    Hi Jewelshama,
    Thank you for quick direction but my auto fill qty=0 when the "NA" or QTY=1 when a Flasher # is selected stop working. This sheet is a small portion of a very large sheet (300 columns & hundred rows and each cell has its own data validation) that is the reason I would like to speed up the clearing process. I will try to modify the draft code. Do you have any idea for clearing the row & nesting?
    Thank you
    Thup_98

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: I there a quick way to deselect all selections in all cells from dropdown lists?

    we can reset all desired cells with Worksheet_SelectionChange event; when the user clicks on the cell A24. Try the following code (also see attached workbook).
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Is there a quick way to deselect all selections in all cells from dropdown lists?

    Hi Jewelshama,
    I modified your code to deselect rows and deselect all but it only works in sequence.
    How can I make it works by random selecting from cells A2 to A8? And is there a way to make the code shorter instead of copy and paste 100 times and make changes to the cells numbers? Please see the code in attached file.
    Thank you so much for your help.
    Thup_98
    Attached Files Attached Files
    Last edited by thup_98; 02-10-2016 at 03:03 AM.

  6. #6
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: I there a quick way to deselect all selections in all cells from dropdown lists?

    Hi Jewelshama or anyone able to offer any ideas on this thread?
    Thank you so much for your help.
    Thup_98

  7. #7
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: I there a quick way to deselect all selections in all cells from dropdown lists?

    code shortened. Will now apply only for the specific Row selected.
    Please Login or Register  to view this content.
    HTH!
    Last edited by jewelsharma; 02-10-2016 at 07:53 PM. Reason: Code amended

  8. #8
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: I there a quick way to deselect all selections in all cells from dropdown lists?

    Hi Jewelshama,
    Thank you for quick respond, but when I answer the Msg Box either Yes or No it will reset the data validation.
    Thup_98

  9. #9
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: I there a quick way to deselect all selections in all cells from dropdown lists?

    sorry mate, my oversight!
    I have amended the code in post #7 above.

  10. #10
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Is there a quick way to deselect all selections in all cells from dropdown lists?

    Hi Jewelshama,
    It works perfectly.Do you have any idea how to make the code in my workbook_sheetchange shorter?

    Please Login or Register  to view this content.
    Thank you so much for your help!
    Thup_98

  11. #11
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Is there a quick way to deselect all selections in all cells from dropdown lists?

    Sure can. For e.g. you can replace these lines:
    Please Login or Register  to view this content.
    with these lines:
    Please Login or Register  to view this content.
    ... you may amend/shorten other lines similarly.


    However, I suggest you post this request in a separate 'New Thread'. That way, you are likely to receive response from more Forum members.

    Also, trust your original request has been satisfactorily answered. Please take a moment to mark the thread as SOLVED. Here's how:

    Method 1
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    Method 2
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

  12. #12
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Is there a quick way to deselect all selections in all cells from dropdown lists?

    Thank you so much Jewelshama.
    Thup_98

+ 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. Dropdown selections based on adjacent dropdown selected
    By mtvufg8r in forum Excel General
    Replies: 2
    Last Post: 11-07-2014, 12:25 PM
  2. Looking for a quick way to deselect all PivotItems and then select just a few
    By jeffadkisson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2014, 07:49 PM
  3. how to ignore blank cells in creatig dropdown lists (validation lists)
    By Elainefish in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-02-2013, 07:45 AM
  4. using dropdown lists to populate range of cells
    By tsiguy96 in forum Excel General
    Replies: 11
    Last Post: 03-16-2012, 05:58 PM
  5. Quick question. Dropdown lists
    By CaptainNoBeard in forum Excel General
    Replies: 3
    Last Post: 06-23-2010, 12:44 PM
  6. Reset Dropdown Lists based on Other inputs / cells
    By jonreynolds in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-12-2009, 12:20 PM
  7. DropDown Lists in Cells
    By TREBORA in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-14-2008, 12:27 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