ExcelVBA - Macro to distinguish between numbers and dates

  • Thread starter Thread starter kevinmawn
  • Start date Start date
K

kevinmawn

Hi all!

I have a situation where I import data (Date, Price, GL/Account
Department) into excel from a database. My problem is that the dat
never comes out with the same column order, and it comes out withou
headings. I need to find a macro that will distinguish between eac
column.

Here's an example of the data:

M-INV 3.2 01/04/04 409000-60940
M-PRO 10 02/04/04 409010-60950
M-INV 5.22 03/02/04 409370-65501

Here's another example of the data:

409000-60940 01/04/04 M-INV 3.2
409010-60950 02/04/04 M-PRO 10
409370-65501 03/02/04 M-INV 5.22

I found a way to distinguish between Department and GL/Account (th
first and last column in the 1st example): with the function MID.

Now I need a macro that will find what column has dates entries an
what column has price entries

Any ideas?

Thanks

Kevi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top