Sorting Integers in VB Excel

bobo6429

New Member
Joined
Dec 3, 2008
Messages
3
Is there a way to identify an integer as a category using Excel VBasic? I have a LARGE document, and I need to get rid of superfluous data. I want to eventually remove rows that don't start with an integer from the worksheet, but first I need a way to automatically differentiate between integers and strings as categories. Please help, and thanks in advance.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
You can use a formula like:
=ISNUMBER(A1)
to identify whether a cell contains a number or not. (This returns TRUE or FALSE) You can then use this with an autofilter or a sort to easily extract rows that have a number in column A from those that don't. Does that help?
 
Upvote 0
Something like:
Code:
Sheets("sheet name").Range("B1:B1000").FormulaR1C1 = "=ISNUMBER(RC1)"
 
Upvote 0

Forum statistics

Threads
1,215,633
Messages
6,125,928
Members
449,274
Latest member
mrcsbenson

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