VBA to search for multiple values

burniksapwet

Board Regular
Joined
Oct 6, 2017
Messages
53
Office Version
  1. 2016
Guys I need some help. I need a way to do a filter to where I can just type something like this and get the result 82CL10, 182CL21, 82CM10, 282CM29, 82CM32, 992CS12, 82DT152 and filter just these results. Is this at all possible? I have attached the excel file and a pdf of a sample of what I want it to be. Thank you in advance everyone.

https://www.dropbox.com/s/qnvypuyhhkv9v5z/Book1.xlsx?dl=0
https://www.dropbox.com/s/e4egroarqbms4vn/Book1.pdf?dl=0

I'm not sure if link I made can be viewed by everyone. Please let me know how it turns out. Thank you so much once again.
 
Perfect sir it is what we are looking for. Now in doing our testing I have found something odd. It is not filtering a field if it only has numerical values. Lucky for now all the things that we need to filter will have a mixture of both. But in case there is a few that only has numerical value to it we would like to maybe filter those as well. Is that something that you could fix by any chance? Sorry for now just throwing this at you, we were not really able to fully test it until now that you have given us the final product. And like I said we are mostly dealing with a combination of numerical and alphabetical text. Like 82LSG1234 FEB1234 etc etc. Hopefully the macro can include filters for just numerical values like for example 1234, 4567, 8790. Thank you so much.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
got it to work. Thank you sir. We do appreciate your patience. This is why we love this community. Thank you so much.
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0
Found out another issue. Sorry for doing this as we are not that technical excel users. The reason why it didn't work the first time I converted it to text is because that is not enough to do so. We need to go inside the cell and press enter to completely change the field to text. Once you do it will create a little green arrow looking icon at the top left hand side of the cell. This will indicate that it is a numbered stored as text. We need to do it for each cell or else it will not see it as text. I will post another request if need be but is there a macro that can be created to do all this? I don't really know now how to convert each cell to something like this unless we go to each one and press enter. I know it has to be done this way because the cells that doesn't have the green icon does not get filtered with the macro you created. As you could see from the picture it only filtered the ones with the green icon on it.

https://www.dropbox.com/s/c257skbk490ucgo/1.gif?dl=0
https://www.dropbox.com/s/xqpz6s7ame2lkxg/2.gif?dl=0
 
Upvote 0
Simply select the entire column & format as text. No macros needed.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top