Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Coverting a VBA array from 2-D to 1-D

test <g


"Harlan Grove" wrote in message
...
"Tom Ogilvy" wrote...
Please fix/set your computer clock. You are way ahead of everyone else.


In my other response, the one that included only the word test in the

body,
I had set my system clock to a different time of day. However, the

date/time
stamp in the posting showed the correct date and time when I posted it. I
believe the NNTP server through which one posts (even indirectly through
browser interfaces) sets the message's date/time stamp, and a user's

system
clock's settings are irrelevant. If so, I'd bet the OP would have a hard
time setting his ISP's NNTP server's clock.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Coverting a VBA array from 2-D to 1-D

test

(I left the time correct, but changed the timezone to Bombay.)

I posted at 6:08 PM CST.

Vasant Nanavati wrote:

I don't believe you are correct, Harlan ... please see the date on my "test"
post just made! Perhaps this property is server-dependent.

--

Vasant

"Harlan Grove" wrote in message
...
"Tom Ogilvy" wrote...
Please fix/set your computer clock. You are way ahead of everyone else.


In my other response, the one that included only the word test in the

body,
I had set my system clock to a different time of day. However, the

date/time
stamp in the posting showed the correct date and time when I posted it. I
believe the NNTP server through which one posts (even indirectly through
browser interfaces) sets the message's date/time stamp, and a user's

system
clock's settings are irrelevant. If so, I'd bet the OP would have a hard
time setting his ISP's NNTP server's clock.



--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Coverting a VBA array from 2-D to 1-D

Dave,

If that is all you want and you don't want loops, why not just use

Dim myarray(1)

myarray(0) = [A1] & [B1] & [C1] & [D1]
myarray(1) = [A2] & [B2] & [C2] & [D2]

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave" wrote in message
u...
I know I can quickly map a 2d range to an array with code such as

Sub MyArr()
Dim myarray
myarray = [A1:D2]
End Sub

Is there a quick way to convert the array into a single dimension without
using a FOR loop?
I want to end up with an array of two elements, the first containing a
concatenated string of A1 to D1 the second of A2 to D2.

Thanks






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Coverting a VBA array from 2-D to 1-D

looping in an array is extremely fast.

Looping would be the only way to do what you want with the array. If you
want to use the worksheet, you could insert a dummy column and do the
concatenation in the dummy column, then pick up the results and delete the
column.

--
Regards,
Tom Ogilvy

Dave wrote in message
u...
Hi Bob,

I want to run a routine on the usedrange so there could be up to 256

values
per element

I thought or maybe more accurately hoped that there may be some sort of
array conversion I could do - I was concerned that a FOR loop would take

a
long time on say 200 columns by 10000 rows

Is a loop the only way?

Thanks

Dave


"Bob Phillips" wrote in message
...
Dave,

If that is all you want and you don't want loops, why not just use

Dim myarray(1)

myarray(0) = [A1] & [B1] & [C1] & [D1]
myarray(1) = [A2] & [B2] & [C2] & [D2]

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave" wrote in message
u...
I know I can quickly map a 2d range to an array with code such as

Sub MyArr()
Dim myarray
myarray = [A1:D2]
End Sub

Is there a quick way to convert the array into a single dimension

without
using a FOR loop?
I want to end up with an array of two elements, the first containing a
concatenated string of A1 to D1 the second of A2 to D2.

Thanks










  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Coverting a VBA array from 2-D to 1-D

Please fix/set your computer clock. You are way ahead of everyone else.

--
Regards,
Tom Ogilvy

Dave wrote in message
u...
Hi Bob,

I want to run a routine on the usedrange so there could be up to 256

values
per element

I thought or maybe more accurately hoped that there may be some sort of
array conversion I could do - I was concerned that a FOR loop would take

a
long time on say 200 columns by 10000 rows

Is a loop the only way?

Thanks

Dave


"Bob Phillips" wrote in message
...
Dave,

If that is all you want and you don't want loops, why not just use

Dim myarray(1)

myarray(0) = [A1] & [B1] & [C1] & [D1]
myarray(1) = [A2] & [B2] & [C2] & [D2]

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave" wrote in message
u...
I know I can quickly map a 2d range to an array with code such as

Sub MyArr()
Dim myarray
myarray = [A1:D2]
End Sub

Is there a quick way to convert the array into a single dimension

without
using a FOR loop?
I want to end up with an array of two elements, the first containing a
concatenated string of A1 to D1 the second of A2 to D2.

Thanks












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Coverting a VBA array from 2-D to 1-D

test


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Coverting a VBA array from 2-D to 1-D

"Tom Ogilvy" wrote...
Please fix/set your computer clock. You are way ahead of everyone else.


In my other response, the one that included only the word test in the body,
I had set my system clock to a different time of day. However, the date/time
stamp in the posting showed the correct date and time when I posted it. I
believe the NNTP server through which one posts (even indirectly through
browser interfaces) sets the message's date/time stamp, and a user's system
clock's settings are irrelevant. If so, I'd bet the OP would have a hard
time setting his ISP's NNTP server's clock.


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Coverting a VBA array from 2-D to 1-D

I don't believe you are correct, Harlan ... please see the date on my "test"
post just made! Perhaps this property is server-dependent.

--

Vasant


"Harlan Grove" wrote in message
...
"Tom Ogilvy" wrote...
Please fix/set your computer clock. You are way ahead of everyone else.


In my other response, the one that included only the word test in the

body,
I had set my system clock to a different time of day. However, the

date/time
stamp in the posting showed the correct date and time when I posted it. I
believe the NNTP server through which one posts (even indirectly through
browser interfaces) sets the message's date/time stamp, and a user's

system
clock's settings are irrelevant. If so, I'd bet the OP would have a hard
time setting his ISP's NNTP server's clock.




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Coverting a VBA array from 2-D to 1-D

And Now I am back.

--
Regards,
Tom Ogilvy

Tom Ogilvy wrote in message
...
It seems pretty well established that the user's system clock determines

at
least the initial settings for the email. The NNTP server may get

involved,
but I believe that depends on the NNTP server. Maybe NewsRanger, makes a
correction. When I set the date to Aug 2053, SuperNews rejected it as
malformed date header.

--
Regards,
Tom Ogilvy

Harlan Grove wrote in message
...
"Tom Ogilvy" wrote...
Please fix/set your computer clock. You are way ahead of everyone

else.

In my other response, the one that included only the word test in the

body,
I had set my system clock to a different time of day. However, the

date/time
stamp in the posting showed the correct date and time when I posted it.

I
believe the NNTP server through which one posts (even indirectly through
browser interfaces) sets the message's date/time stamp, and a user's

system
clock's settings are irrelevant. If so, I'd bet the OP would have a hard
time setting his ISP's NNTP server's clock.






  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Coverting a VBA array from 2-D to 1-D

And posted this with my correct timezone and correct time.

(6:16 pm CST)

So maybe the OP has the wrong Timezone.



Dave Peterson wrote:

test

(I left the time correct, but changed the timezone to Bombay.)

I posted at 6:08 PM CST.

Vasant Nanavati wrote:

I don't believe you are correct, Harlan ... please see the date on my "test"
post just made! Perhaps this property is server-dependent.

--

Vasant

"Harlan Grove" wrote in message
...
"Tom Ogilvy" wrote...
Please fix/set your computer clock. You are way ahead of everyone else.

In my other response, the one that included only the word test in the

body,
I had set my system clock to a different time of day. However, the

date/time
stamp in the posting showed the correct date and time when I posted it. I
believe the NNTP server through which one posts (even indirectly through
browser interfaces) sets the message's date/time stamp, and a user's

system
clock's settings are irrelevant. If so, I'd bet the OP would have a hard
time setting his ISP's NNTP server's clock.



--

Dave Peterson


--

Dave Peterson



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Coverting a VBA array from 2-D to 1-D

Tom,

It's like you were never gone <g.

Doug

"Tom Ogilvy" wrote in message
...
And Now I am back.

--
Regards,
Tom Ogilvy

Tom Ogilvy wrote in message
...
It seems pretty well established that the user's system clock determines

at
least the initial settings for the email. The NNTP server may get

involved,
but I believe that depends on the NNTP server. Maybe NewsRanger, makes a
correction. When I set the date to Aug 2053, SuperNews rejected it as
malformed date header.

--
Regards,
Tom Ogilvy

Harlan Grove wrote in message
...
"Tom Ogilvy" wrote...
Please fix/set your computer clock. You are way ahead of everyone

else.

In my other response, the one that included only the word test in the

body,
I had set my system clock to a different time of day. However, the

date/time
stamp in the posting showed the correct date and time when I posted

it.
I
believe the NNTP server through which one posts (even indirectly

through
browser interfaces) sets the message's date/time stamp, and a user's

system
clock's settings are irrelevant. If so, I'd bet the OP would have a

hard
time setting his ISP's NNTP server's clock.








  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Coverting a VBA array from 2-D to 1-D

I put up two posts with a year of 2053. I can't see them from SuperNews,
but I can from the Microsoft Server.

Just proves that observation is not always reliable.

--
Regards,
Tom Ogilvy


Doug Glancy wrote in message
...
Tom,

It's like you were never gone <g.

Doug

"Tom Ogilvy" wrote in message
...
And Now I am back.

--
Regards,
Tom Ogilvy

Tom Ogilvy wrote in message
...
It seems pretty well established that the user's system clock

determines
at
least the initial settings for the email. The NNTP server may get

involved,
but I believe that depends on the NNTP server. Maybe NewsRanger, makes

a
correction. When I set the date to Aug 2053, SuperNews rejected it

as
malformed date header.

--
Regards,
Tom Ogilvy

Harlan Grove wrote in message
...
"Tom Ogilvy" wrote...
Please fix/set your computer clock. You are way ahead of everyone

else.

In my other response, the one that included only the word test in

the
body,
I had set my system clock to a different time of day. However, the
date/time
stamp in the posting showed the correct date and time when I posted

it.
I
believe the NNTP server through which one posts (even indirectly

through
browser interfaces) sets the message's date/time stamp, and a user's
system
clock's settings are irrelevant. If so, I'd bet the OP would have a

hard
time setting his ISP's NNTP server's clock.










  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Coverting a VBA array from 2-D to 1-D

These are parts of the headers:
----------------
Aug 15, 2053
----------------

From: "Tom Ogilvy"
Subject: Coverting a VBA array from 2-D to 1-D
Date: Thu, 14 Aug 2053 19:05:03 -0400
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
Message-ID:
Newsgroups: microsoft.public.excel.programming

---------------------
Dec 15 2053
----------------------

From: "Tom Ogilvy"
Subject: Coverting a VBA array from 2-D to 1-D
Date: Mon, 15 Dec 2053 07:10:00 -0500
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
Message-ID:
Newsgroups: microsoft.public.excel.programming


----------------------

--
Regards,
Tom Ogilvy



  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Coverting a VBA array from 2-D to 1-D

Another test - system date set to June 1, 1984.


  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Coverting a VBA array from 2-D to 1-D

It appears Newsranger does do the sensible thing and ignores whatever
date/time my system puts on what it sends to the NNTP server and uses its
own system time.

Still, it does open the possibility that the OP can't adjust the date/time
stamp on his posts.




  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Coverting a VBA array from 2-D to 1-D

Hello Dave,

As Tom wrote, looping in an array is not so slow. I totally agree with Tom's
opinion.
But If UBound(array2D) < 5462 Then you can use Application.Transpose
something like this.

array1D = Application.Transpose(array2D)

It returnes 1-D array


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Dave" wrote in message
u...
Hi Bob,

I want to run a routine on the usedrange so there could be up to 256

values
per element

I thought or maybe more accurately hoped that there may be some sort of
array conversion I could do - I was concerned that a FOR loop would take

a
long time on say 200 columns by 10000 rows

Is a loop the only way?

Thanks

Dave


"Bob Phillips" wrote in message
...
Dave,

If that is all you want and you don't want loops, why not just use

Dim myarray(1)

myarray(0) = [A1] & [B1] & [C1] & [D1]
myarray(1) = [A2] & [B2] & [C2] & [D2]

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave" wrote in message
u...
I know I can quickly map a 2d range to an array with code such as

Sub MyArr()
Dim myarray
myarray = [A1:D2]
End Sub

Is there a quick way to convert the array into a single dimension

without
using a FOR loop?
I want to end up with an array of two elements, the first containing a
concatenated string of A1 to D1 the second of A2 to D2.

Thanks









  #17   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Coverting a VBA array from 2-D to 1-D

Read the entire range into a variant with one operation, then remap the
elements into another array any way you wish.

--
http://www.standards.com/; See Howard Kaikow's web site.
"Dave" wrote in message
u...
Hi Bob,

I want to run a routine on the usedrange so there could be up to 256

values
per element

I thought or maybe more accurately hoped that there may be some sort of
array conversion I could do - I was concerned that a FOR loop would take

a
long time on say 200 columns by 10000 rows

Is a loop the only way?

Thanks

Dave


"Bob Phillips" wrote in message
...
Dave,

If that is all you want and you don't want loops, why not just use

Dim myarray(1)

myarray(0) = [A1] & [B1] & [C1] & [D1]
myarray(1) = [A2] & [B2] & [C2] & [D2]

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave" wrote in message
u...
I know I can quickly map a 2d range to an array with code such as

Sub MyArr()
Dim myarray
myarray = [A1:D2]
End Sub

Is there a quick way to convert the array into a single dimension

without
using a FOR loop?
I want to end up with an array of two elements, the first containing a
concatenated string of A1 to D1 the second of A2 to D2.

Thanks










  #18   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Coverting a VBA array from 2-D to 1-D

I know I can quickly map a 2d range to an array with code such as

Sub MyArr()
Dim myarray
myarray = [A1:D2]
End Sub

Is there a quick way to convert the array into a single dimension without
using a FOR loop?
I want to end up with an array of two elements, the first containing a
concatenated string of A1 to D1 the second of A2 to D2.

Thanks




  #19   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Coverting a VBA array from 2-D to 1-D

Hi Bob,

I want to run a routine on the usedrange so there could be up to 256 values
per element

I thought or maybe more accurately hoped that there may be some sort of
array conversion I could do - I was concerned that a FOR loop would take a
long time on say 200 columns by 10000 rows

Is a loop the only way?

Thanks

Dave


"Bob Phillips" wrote in message
...
Dave,

If that is all you want and you don't want loops, why not just use

Dim myarray(1)

myarray(0) = [A1] & [B1] & [C1] & [D1]
myarray(1) = [A2] & [B2] & [C2] & [D2]

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave" wrote in message
u...
I know I can quickly map a 2d range to an array with code such as

Sub MyArr()
Dim myarray
myarray = [A1:D2]
End Sub

Is there a quick way to convert the array into a single dimension

without
using a FOR loop?
I want to end up with an array of two elements, the first containing a
concatenated string of A1 to D1 the second of A2 to D2.

Thanks








  #20   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Coverting a VBA array from 2-D to 1-D

Dave, check the second tab of the Date/Time dialog to make sure you are set
for the correct time zone. This is the more prevalent problem as most
computer clocks seem to be factory-set to the US West Coast time zone by
default.

--

Vasant


"Dave" wrote in message
u...
Hi Tom,

I don't know what would have happened, the time does look late but I

haven't
changed my clock and I thought that I did post this latish Sunday evening

I'm posting from Australia and we do have our clocks a little earlier for
daylight saving but 17 hours in front of you does seem a little extreme.
I'm posting this on Monday Dec 15 at 19.20.

Cheers

Dave

"Tom Ogilvy" wrote in message
...
Please fix/set your computer clock. You are way ahead of everyone else.

--
Regards,
Tom Ogilvy

Dave wrote in message
u...
Hi Bob,

I want to run a routine on the usedrange so there could be up to 256

values
per element

I thought or maybe more accurately hoped that there may be some sort

of
array conversion I could do - I was concerned that a FOR loop would

take
a
long time on say 200 columns by 10000 rows

Is a loop the only way?

Thanks

Dave


"Bob Phillips" wrote in message
...
Dave,

If that is all you want and you don't want loops, why not just use

Dim myarray(1)

myarray(0) = [A1] & [B1] & [C1] & [D1]
myarray(1) = [A2] & [B2] & [C2] & [D2]

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave" wrote in message
u...
I know I can quickly map a 2d range to an array with code such as

Sub MyArr()
Dim myarray
myarray = [A1:D2]
End Sub

Is there a quick way to convert the array into a single dimension
without
using a FOR loop?
I want to end up with an array of two elements, the first

containing
a
concatenated string of A1 to D1 the second of A2 to D2.

Thanks
















  #21   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Coverting a VBA array from 2-D to 1-D

Hi Tom,

I don't know what would have happened, the time does look late but I haven't
changed my clock and I thought that I did post this latish Sunday evening

I'm posting from Australia and we do have our clocks a little earlier for
daylight saving but 17 hours in front of you does seem a little extreme.
I'm posting this on Monday Dec 15 at 19.20.

Cheers

Dave

"Tom Ogilvy" wrote in message
...
Please fix/set your computer clock. You are way ahead of everyone else.

--
Regards,
Tom Ogilvy

Dave wrote in message
u...
Hi Bob,

I want to run a routine on the usedrange so there could be up to 256

values
per element

I thought or maybe more accurately hoped that there may be some sort of
array conversion I could do - I was concerned that a FOR loop would

take
a
long time on say 200 columns by 10000 rows

Is a loop the only way?

Thanks

Dave


"Bob Phillips" wrote in message
...
Dave,

If that is all you want and you don't want loops, why not just use

Dim myarray(1)

myarray(0) = [A1] & [B1] & [C1] & [D1]
myarray(1) = [A2] & [B2] & [C2] & [D2]

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave" wrote in message
u...
I know I can quickly map a 2d range to an array with code such as

Sub MyArr()
Dim myarray
myarray = [A1:D2]
End Sub

Is there a quick way to convert the array into a single dimension

without
using a FOR loop?
I want to end up with an array of two elements, the first containing

a
concatenated string of A1 to D1 the second of A2 to D2.

Thanks












Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Coverting to minutes Gostwin Excel Discussion (Misc queries) 2 June 5th 08 10:02 PM
coverting h:mm to decimal richzip Excel Discussion (Misc queries) 2 February 15th 08 07:42 PM
Coverting seconds into hr:min:sec jsturino Excel Discussion (Misc queries) 3 March 24th 06 08:00 AM
Coverting time Kim Excel Worksheet Functions 1 September 20th 05 01:24 AM
Coverting array data into single column dgarg Excel Worksheet Functions 4 December 15th 04 07:43 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"