0
votes

In an Excel workbook, I need an Excel Macro to split the following Excel into two sheets: with one sheet having all the columns with strings, and the other sheet with all the columns as numbers.

Folder: Country
- Column: Country ([GOS.COUNTRY_MULTILINGUAL.COUNTRY], String)
- Column: Flag Image ([GOS.COUNTRY.FLAG_IMAGE], String)
- Column: Currencyname ([GOS.COUNTRY_MULTILINGUAL.CURRENCY_NAME], String)
- Column: Salescountrycode ([GOS.COUNTRY.COUNTRY_CODE], Number)
- Column: Isotwolettercode ([GOS.COUNTRY.ISO_TWO_LETTER_CODE], String)
- Column: Isothreelettercode ([GOS.COUNTRY.ISO_THREE_LETTER_CODE], String)
- Column: Isothreedigitcode ([GOS.COUNTRY.ISO_THREE_DIGIT_CODE], String)
- Column: Euroinusesince ([GOS.COUNTRY.EURO_IN_USE_SINCE], Date and Time)
Folder: Conversion Rate
- Column: Conversionmonth ([GOS.CONVERSION_RATE.CONVERSION_MONTH], Number)
- Column: Conversionyear ([GOS.CONVERSION_RATE.CONVERSION_YEAR], Number)
- Column: Conversiontolocal ([GOS.CONVERSION_RATE.CONVERSION_TO_LOCAL], Number)
Folder: Euro Conversion
- Column: Euromonth ([GOS.EURO_CONVERSION.EURO_MONTH], Number)
- Column: Euroyear ([GOS.EURO_CONVERSION.EURO_YEAR], Number)
- Column: Eurotolocal ([GOS.EURO_CONVERSION.EURO_TO_LOCAL], Number)
Folder: Conditions
- Filter: Asia ([GOS.COUNTRY_MULTILINGUAL.COUNTRY] in ( 'China' , 'Japan' , 'Korea' , 'Taiwan' ) , Boolean)
- Filter: Europe ([GOS.COUNTRY_MULTILINGUAL.COUNTRY] in ( 'Austria' , 'Belgium' , 'Denmark' , 'England' , 'Finland' , 'France' , 'Germany' , 'Italy' , 'Netherlands' , 'Spain' , 'Sweden' , 'Switzerland' ) , Boolean)
- Filter: North America ([GOS.COUNTRY_MULTILINGUAL.COUNTRY] in ( 'Canada' , 'Mexico' , 'United States' ) , Boolean)

1
Some of your columns listed aren't Strings or Numbers. How do the filters play into this? Is this really an existing Excel workbook, or is it coming directly out of a database?Lance Roberts
Hi, Thanks for your response. It is coming out from a databaseuser501038

1 Answers

0
votes

Since you have other column types besides String and Number, I'm not sure what you want your default to be, but if you wanted everything else to be considered a String then just use:

Application.IsNumber(Range("A1").value)