Search TeachExcel.com
TeachExcel.com
TE
Teach Excel MS Office Tutorials Excel Consulting Services Excel Forum
Excel Video Tutorials Excel Tips Free Excel Macros Excel Help Resources Contact TeachExcel
Video Tutorials
  • Free Macros
  • Excel Help Directory
  • Excel 2007 Resources
  • Keyboard Shortcuts
  • Excel Forum
  • Contact/About

Macros
Excel Tutorials For Macros

Remove All Data Validation from a Cell in Excel


Bookmark and Share

Remove all data validation from a cell in Excel with this free Excel macro. This is a great macro to use when you need to remove all data validation from cells in Excel. This removes drop down menus and lists, input messages, and all other data validation from a cell in Excel.

Below, there are two versions of this macro. The first version works on a specific hard-coded cell or range of cells in Excel while the second macro will work on any selected cell or range of cells within Excel.

To use the first macro, replace A1 with the cell reference or range of cells from which you want to remove data validation. The second macro does not need to be changed; simply select any cell or range of cells in Excel and run the second macro and it will work.
Where to install the macro:  Module

Excel Macro to Remove All Data Validation from a Specific Cell or Range of Cells in Excel

Sub Remove_Data_Validation_Cell()

Range("A1").Validation.Delete

End Sub


Excel Macro to Remove All Data Validation from a Selection of Cells in Excel

Sub Remove_Data_Validation_Selection()

Selection.Validation.Delete

End Sub


Bookmark and Share


How to Install the Macro
  1. Select and copy the text from within the grey box above.

  2. Open the Microsoft Excel file in which you would like the Macro to function.

  3. Press "Alt + F11" - This will open the Visual Basic Editor - Works for all Excel Versions.  Or For other ways to get there, Click Here.

      For Excel Versions Prior to Excel 2007
      Go to Tools > Macros > Visual Basic Editor

      For Excel 2007
      Go to Office Button > Excel Options > Popular > Click Show Developer tab in the Ribbon. Then go to the Developer tab on the ribbon menu and on the far left Click Visual Basic

  4. On the new window that opens up, go to the left side where the vertical pane is located. Locate your Excel file; it will be called VBAProject (YOUR FILE'S NAME HERE) and click this.

  5. If the Macro goes in a Module, Click Here, otherwise continue to Step 8.

    1. Go to the menu at the top of the window and click Insert > Module
    2. Another window should have opened within the Visual Basic Editor's window. Within this new window, paste the macro code. Make sure to paste the code underneath the last line of anything else that is in the window.
    3. Go to Step 8.

  6. If the Macro goes in the Workbook or ThisWorkbook, Click Here, otherwise continue to Step 8.

    1. Directly underneath your excel file called VBAProject(your file's name here), click the Microsoft Excel Objects folder icon to open that drop-down list.
    2. Then, at the bottom of the list that appears, double-click the ThisWorkbook text.
    3. A new window inside the Visual Basic Editor's window will appear. In this new window, paste the code for the macro. Make sure to paste this code underneath the last line of any other code which is already in the window.
    4. Go to Step 8.

  7. If the Macro goes in the Worksheet Code, Click Here, otherwise continue to Step 8.

    1. Directly underneath your excel file called VBAProject(your file's name here), click the Microsoft Excel Objects folder icon to open that drop-down list.
    2. Within the list that appears you will see every worksheet that is in that excel file. They will be listed as such: Sheet1(NAME OF SHEET HERE) and under that will be Sheet2(NAME OF SHEET HERE). Select the sheet in which you want the macro to run and double-click that sheet.
    3. A new window inside the Visual Basic Editor's window will appear. In this new window, paste the code for the macro. Make sure to paste this code underneath the last line of any other code which is already in the window.
    4. Repeat steps b and c for every sheet you want the macro to work in. Putting the macro in one sheet will not enable it for any other sheets in the workbook.
    5. Go to Step 8.

  8. Close the Microsoft Visual Basic Editor window and save the Excel file. When you close the Visual Basic Editor window, the regular Excel window will not close.

  9. You are now ready to run the macro.



Similar Helpful Excel Resources

How Do I Remove Data Validation Enteries In Excel 97? - Excel

View Content
Marc




Remove Blanks From Data Validation - Excel

View Content
Im having trouble removing blanks from a data validation list.

I have two worksheets, Materials and Prices.

On the materials page I have I have groups of items, which are all given defined names, theres around 10 groups of materials, all with about 10 or so items in each group of material.

On the Prices page, I have two combo boxes, the first selects the type of material using simple validation, the second displays the items within that type of material using the following formula;

Quote:

=INDIRECT(B7)

Ive ensured ive ticked the box to ignore the blanks on both sets of data valdiation, but still displays the blanks.

When opening the second drop down box, because the defined name is in a range (i.e =Materials!$A$1036:$A$1065 ) it will also display the blanks.

Can anyone offer any advice on how to get around the blanks?

Remove Blanks In Data Validation - Excel

View Content
I have an issue with attempting to remove blanks that appear within the drop down list.

The list is in a seperate tab within the same workbook (i understand you cant reference seperate workbooks) this however means that "remove Blanks" no longer works.

The good news is that all the blanks will be at the end of (bottom) of the column im referencing. This sheet is referencing a seperate workbook to overcome the issue of referencing seperate workbooks within a Validation list. As this seperate workbook sheet will continue to grow i am referencing cells that have not yet been filled.

I have used the following formula in order to change all the zeros i recieved in to blanks.

=IF(ISBLANK('\\Server\[live job list.xlsx]Live Job List.rpt'!A2135),"",'\\Server\[live job list.xlsx]Live Job List.rpt'!A2135)

I need something that will stop blanks from appearing within the Validation Drop Down Box.

Data Validation (indirect) Remove Blank Cells - Excel

View Content
I have a Data Validation on "R1" (Using a Name range)

i also have a Data Validation on "M3" (using "=Indirect($R$1)")

My Problem is there are Blank Cells in some of the range..
ie. Column A:D (A=Name1, B=Name2, C=Name3, D=Name4)
Column A Range is A1:A20 (But my list data is up to A1:A12 Only so from row A13 to A20 is Blank)
Column B Range is B1:B20(But my list data is up to B1:B17 Only so from row B18 to B20 is Blank)
Column C Range is C1:C20 (But my list data is up to C1:C8 Only so from row C9 to C20 is Blank)
Column D Range is D1:D20 (list is coplete form D1:D20 so, no Blank fields, this one is Ok)


Are there any VBA code or Macro that will force my Data Validation in "M3" NOT to show Blank cells..Thanks

Remove Blank Spaces In Data Validation List+vba - Excel

View Content
Hi,

My situation is that, im using data validation list for showing list of values from oracle DB. I have put the LOV (taken from oracle DB) into column A of sheet 1. And i named that range (from A2:A1048576, A1 contain the column name) as range1. And i given that range name in the formula.(formula:="=range1") But the problem is, if columnA contain 25 values first and then if some values are deleted from the DB and contain 20 values. The data validation list shows the 20 items and blank space for the rest items in the end of the list. How can i discard this blank space

Anybody please help in solving this.

Thanks in advance

Remove Chosen Item From Data Validation List - Excel

View Content
I have a sheet in which there is a table with details like date , product sales etc.....
i want to validate the cell data in a cell of another sheet and this data should be a list of all the dates in the first sheet....It should not repeat though... and this table in sheet 1 will go on expanding at later stages.... at any point, when i click the drop down of the cell in that second sheet, i want to see all the unique dates of the first table.. can u please help me out in this....

Remove Blank Entries From Data Validation List - Excel

View Content
How do I remove blank entries from the data validation list in C1?

The user will be inputting values only in cells A1-A4, A7-A10, & A13-A16, and the entries will be random. These cells will be empty initially.

The data validation list in C1 should show only the actual entries - as shown in the attached (Entry Right.jpg):
Entry Right.jpg

But all I can muster (by setting B1 thru B12 to the values in A1-A4, A7-A10, & A13-A16 respectively, naming the B1:B12 range, and referring to the named range as the data validation list source) is as shown in the attached (Entry Wrong.jpg), with all of the blanks:
Entry Wrong.jpg

Sorting, such as alphabetical sorting, is not required.

Thanks for any suggestions.

Vba And Data Validation: Possible To Dynamically Add/remove Formatted Rows - Excel

View Content
Hello,

I very much appreciate anyone who has the time to consider this request.

I found this great worksheet and hoped that the code could be modified to allow formatted cells/rows in a worksheet to be added/removed based on the value (e.g., 1-30) in a validation list.

In my case, there may be text underneath the original row that is going to be copied. For instance, if 3 is selected from the Validation List, it will copy a range of cells called "PreferredCells" located in one row and paste 3 copies of it underneath it (preserving the formatting). If the user then subsequently chooses 1 from the Validation List, it will remove 1 row, leaving only 2 rows.

Thank you!

Excel Data Validation And Cell Dependency - Excel

View Content
Hi,

I am trying to create a table which will be used to order equipment in our company. Let's say I have 5 columns which are qty, item number, description, price and total. I created a drop down list in item column which contains item numbers we have and these are stored in another sheet in same workbook. Now all these items have a description which are also in another sheet in same workbook and same thing with the prices of the items. Now what I want is to choose an item in cell a from a from a drop down list and description and price should automatically be entered in cell b and cell c when items is chosen.

I hope I explained it well if not let me know I'll try again. I really hope somebody have a solution to my problem, I would appreciate it.

Thanks,

Macro To Remove Conditional Formatting, Data Validation And Clear Contents - Excel

View Content
I am in need of a macro that will allow the user to select the cell that needs to be over-written. The macro would need to remove the conditional formating and data validation and then clear the formula in that paticular cell.

Thanks
Mark

Random Tutorials
Lookups With MATCH() and INDEX() Functions
(Intermediate)
Consolidate & Combine Data from Separate Worksheets or Workbooks(Excel Files)
(Intermediate)
How to record a Macro - And what One is
(Easy)
Assign a Macro to a Button and Toolbar
(Intermediate)
Assign Keyboard Shortcuts to Macros
(Easy)
How to 'Protect' a Worksheet and Workbook
(Easy)
Submit Inquiry Here
  • Prices From $10
Name:*
E-mail:*
Request:*
The macro(s) on this page will be sent with the request.
Contact | Privacy Policy | Disclaimer
Copyright© 2012 TeachExcel.com