ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to use an array (https://www.excelbanter.com/excel-programming/299966-how-use-array.html)

Eric[_6_]

How to use an array
 
Hi,

I am creating a macro for this plane text file something
like this:
0123456abc111GNP
0312443DEF222VCF
....so on
I want to put them into an array and convert to an excel
file, if may data (or different files) is variable not
fixed not the same above.

If my other file is longer or not the same format. I am
converting different files with different length and I
don't want to modify my macro every now and then.

003131333gnperd141414jkjk141414
111144444sdfdsf324323bbbb333333
.... so on

appreciate very much your help.

Regards
Eric



Tom Ogilvy

How to use an array
 
Just open the file in Excel.

--
Regards,
Tom Ogilvy

"Eric" wrote in message
...
Hi,

I am creating a macro for this plane text file something
like this:
0123456abc111GNP
0312443DEF222VCF
...so on
I want to put them into an array and convert to an excel
file, if may data (or different files) is variable not
fixed not the same above.

If my other file is longer or not the same format. I am
converting different files with different length and I
don't want to modify my macro every now and then.

003131333gnperd141414jkjk141414
111144444sdfdsf324323bbbb333333
... so on

appreciate very much your help.

Regards
Eric





No Name

How to use an array
 
You know what, you don't understand what I am saying, I
need to put that data in an array. It is easy to open a
file in excel and I know that.
-----Original Message-----
Just open the file in Excel.

--
Regards,
Tom Ogilvy

"Eric" wrote in message
...
Hi,

I am creating a macro for this plane text file something
like this:
0123456abc111GNP
0312443DEF222VCF
...so on
I want to put them into an array and convert to an excel
file, if may data (or different files) is variable not
fixed not the same above.

If my other file is longer or not the same format. I am
converting different files with different length and I
don't want to modify my macro every now and then.

003131333gnperd141414jkjk141414
111144444sdfdsf324323bbbb333333
... so on

appreciate very much your help.

Regards
Eric




.


Tom Ogilvy

How to use an array
 
My mistake.

I meant to say

Just open the file in Excel
...so on


I doubt anyone knows what you are saying.

But once you open it in Excel

Dim varr as Variant
varr = Activesheet.Range("A1").CurrentRegion

will put it in an array.

--
Regards,
Tom Ogilvy

wrote in message
...
You know what, you don't understand what I am saying, I
need to put that data in an array. It is easy to open a
file in excel and I know that.
-----Original Message-----
Just open the file in Excel.

--
Regards,
Tom Ogilvy

"Eric" wrote in message
...
Hi,

I am creating a macro for this plane text file something
like this:
0123456abc111GNP
0312443DEF222VCF
...so on
I want to put them into an array and convert to an excel
file, if may data (or different files) is variable not
fixed not the same above.

If my other file is longer or not the same format. I am
converting different files with different length and I
don't want to modify my macro every now and then.

003131333gnperd141414jkjk141414
111144444sdfdsf324323bbbb333333
... so on

appreciate very much your help.

Regards
Eric




.





All times are GMT +1. The time now is 11:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com