A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Okay, my other concern was when the user inputs the number he might copy a trailing space with the number then the number won't show up in the filter.
e.g M5888-9087_ (trailing space denoted as _)
How to handle such trailing spaces with error handling.
Use the following line and it will remove any leading and trailing spaces.
myInp = Trim(VBA.Interaction.InputBox(Prompt:="Enter the number", Title:="MCR Macro"))
In my previous post I omitted to explain why all data is output when no data is displayed in the table. Unfortunately with tables, instead of producing an error, you select the first hidden cell and then down and it actually selects the entire column of data in the table ( the end down goes to bottom of table) and because there is no mix of visible and non visible then it returns the entire column of data.
Tables do some strange things that do not occur on worksheets without tables.
Later today I will see if I can modify your code to test for existence of the entered value and also test that visible data is displayed.