Query for a numeric range in a string field

jeff_cp

Board Regular
Joined
May 21, 2015
Messages
84
I'm building a spreadsheet from a MSQuery that has a string field in the data. Inside this string field contains numbers and text. I need to only query a numeric range in this field. For example, the field can have values like 90019A or 903 or 908C or 900123. I need to query anything in a range of 900000 to 999999.

Is this possible?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
You could bring the data into Power Query/Get and Transform. Split the column based upon the "Digit to Non-Digit" It is one of the native actions available. Then bring your file back to excel and do your analysis.
 
Upvote 0
I've never used Power Query. This spreadsheet will be distributed to other employees so would they need to have Power Query in order for it to work for them?
 
Upvote 0
Power Query is standard on 2016 and later. For versions 2010 and 2013, you will need to download the add-in from Microsoft. In the later versions it has been renamed "Get and Transform." To answer you question directly, it depends upon whether the worksheet is being distributed before or after the PQ actions have taken place. Shared or individual copies. Several variables that obviate a direct answer. Perhaps a little bit of investigation may be necessary. Click on the link in my signature for a starting point.
 
Upvote 0

Forum statistics

Threads
1,214,938
Messages
6,122,346
Members
449,080
Latest member
Armadillos

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