Using variable to autofilter a list - trouble with trailing zeroes

infidelatwork

New Member
Joined
Jan 22, 2014
Messages
1
Hello

I've set up a workbook that populates with the list of "runs" that a department has open. Each run has 10's of sequences, so the total number of rows in the list can easily approach 1000. The user enters the specific run they need to update status on into a textbox, and my vba code filters the list accordingly. Unfortunately, there are some runs that don't filter properly, and I think it is related to the trailing zero. So run numbers are in the format:

...
723140127.009
723140127.010
723140127.011
...

and displayed as numbers on the sheet. However, when I convert the text entry into a number value to use as the filter criteria, it always drops that trailing zero for .010 and so the variable contains 723140127.01, and then the filter hides everything. .009 and .011 function correctly.

What I would like to know is if there is a way for me to force the variable to keep track of that 3rd decimal place, even if it's a zero, or if I will need to backtrack and make some structural changes to the sheet so I can autofilter the suffix seperately.

Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

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