Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to extract data from an array

I have an array with over 21,000 rows. I need to analyze this but have
not been able to get it out in a useful format yet. The data looks
like this:

VarName TimeString VarValue
Pos 27.01.2011 12:49:35 32
Pres 27.01.2011 12:49:35 -2
Setpt 27.01.2011 12:49:35 100
Gain 27.01.2011 12:49:35 1
Int 27.01.2011 12:49:35 10
Pos 27.01.2011 12:49:36 32
Pres 27.01.2011 12:49:36 -2
Setpt 27.01.2011 12:49:36 100
Pos 27.01.2011 12:49:37 32
Pres 27.01.2011 12:49:37 9
Setpt 27.01.2011 12:49:37 100
Pos 27.01.2011 12:49:38 32
Pres 27.01.2011 12:49:38 9
Setpt 27.01.2011 12:49:38 100
Pos 27.01.2011 12:49:39 32
Pres 27.01.2011 12:49:39 24
Setpt 27.01.2011 12:49:39 100
Pos 27.01.2011 12:49:40 32
Pres 27.01.2011 12:49:40 24
Setpt 27.01.2011 12:49:40 100
Gain 27.01.2011 12:49:40 1
Int 27.01.2011 12:49:40 10

I need to extract it into a format something like this in order to
chart it:

TimeString Pos Press Setpt Gain Int
27.01.2011 12:49:35 32 -2 100 1 10
27.01.2011 12:49:36 32 -2 100
27.01.2011 12:49:37 32 9 100
27.01.2011 12:49:38 32 9 100
27.01.2011 12:49:39 32 24 100
27.01.2011 12:49:40 32 24 100 1 10

Any help would be appreciated. I've burned up a couple of days so far
with little luck.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default How to extract data from an array

jmccaski brought next idea :
I have an array with over 21,000 rows. I need to analyze this but have
not been able to get it out in a useful format yet. The data looks
like this:

VarName TimeString VarValue
Pos 27.01.2011 12:49:35 32
Pres 27.01.2011 12:49:35 -2
Setpt 27.01.2011 12:49:35 100
Gain 27.01.2011 12:49:35 1
Int 27.01.2011 12:49:35 10
Pos 27.01.2011 12:49:36 32
Pres 27.01.2011 12:49:36 -2
Setpt 27.01.2011 12:49:36 100
Pos 27.01.2011 12:49:37 32
Pres 27.01.2011 12:49:37 9
Setpt 27.01.2011 12:49:37 100
Pos 27.01.2011 12:49:38 32
Pres 27.01.2011 12:49:38 9
Setpt 27.01.2011 12:49:38 100
Pos 27.01.2011 12:49:39 32
Pres 27.01.2011 12:49:39 24
Setpt 27.01.2011 12:49:39 100
Pos 27.01.2011 12:49:40 32
Pres 27.01.2011 12:49:40 24
Setpt 27.01.2011 12:49:40 100
Gain 27.01.2011 12:49:40 1
Int 27.01.2011 12:49:40 10

I need to extract it into a format something like this in order to
chart it:

TimeString Pos Press Setpt Gain Int
27.01.2011 12:49:35 32 -2 100 1 10
27.01.2011 12:49:36 32 -2 100
27.01.2011 12:49:37 32 9 100
27.01.2011 12:49:38 32 9 100
27.01.2011 12:49:39 32 24 100
27.01.2011 12:49:40 32 24 100 1 10

Any help would be appreciated. I've burned up a couple of days so far
with little luck.


What's the structure of the array?

Is it something like:

myArray(0,0)=[VarName]
myArray(0,1)=TimeString
myArray(0,2)=VarValue

so that:

myArray(0,0) = "Pos"
myArray(1,0) = "Pres"
myArray(2,0) = "Setpt"
myArray(3,0) = "Gain"
myArray(4,0) = "Int"
myArray(5,0) = "Pos"
...and so on

If so then...

To put the values into ColsA:C

For n = LBound(myArray) To UBound(myArray)
Cells(n + 1, 1) = myArray(n,0)
Cells(n + 1, 2) = myArray(n,1)
Cells(n + 1, 3) = myArray(n,2)
Next

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to extract data from an array

On Jan 31, 1:06*pm, GS wrote:
jmccaski brought next idea :



I have an array with over 21,000 rows. I need to analyze this but have
not been able to get it out in a useful format yet. The data looks
like this:


VarName * *TimeString * * *VarValue
Pos * * * *27.01.2011 12:49:35 * * 32
Pres * * * 27.01.2011 12:49:35 * * -2
Setpt * * *27.01.2011 12:49:35 * * 100
Gain * * * 27.01.2011 12:49:35 * * 1
Int * * * *27.01.2011 12:49:35 * * 10
Pos * * * *27.01.2011 12:49:36 * * 32
Pres * * * 27.01.2011 12:49:36 * * -2
Setpt * * *27.01.2011 12:49:36 * * 100
Pos * * * *27.01.2011 12:49:37 * * 32
Pres * * * 27.01.2011 12:49:37 * * 9
Setpt * * *27.01.2011 12:49:37 * * 100
Pos * * * *27.01.2011 12:49:38 * * 32
Pres * * * 27.01.2011 12:49:38 * * 9
Setpt * * *27.01.2011 12:49:38 * * 100
Pos * * * *27.01.2011 12:49:39 * * 32
Pres * * * 27.01.2011 12:49:39 * * 24
Setpt * * *27.01.2011 12:49:39 * * 100
Pos * * * *27.01.2011 12:49:40 * * 32
Pres * * * 27.01.2011 12:49:40 * * 24
Setpt * * *27.01.2011 12:49:40 * * 100
Gain * * * 27.01.2011 12:49:40 * * 1
Int * * * *27.01.2011 12:49:40 * * 10


I need to extract it into a format something like this in order to
chart it:


TimeString * * * * * * * *Pos *Press Setpt Gain Int
27.01.2011 12:49:35 * * * *32 * * *-2 * * *100 * * * * *1 * *10
27.01.2011 12:49:36 * * * *32 * * *-2 * * *100
27.01.2011 12:49:37 * * * *32 * * *9 * * * 100
27.01.2011 12:49:38 * * * *32 * * *9 * * * 100
27.01.2011 12:49:39 * * * *32 * * *24 * * *100
27.01.2011 12:49:40 * * * *32 * * *24 * * *100 * * * * *1 * *10


Any help would be appreciated. I've burned up a couple of days so far
with little luck.


What's the structure of the array?

Is it something like:

* myArray(0,0)=[VarName]
* myArray(0,1)=TimeString
* myArray(0,2)=VarValue

so that:

* myArray(0,0) = "Pos"
* myArray(1,0) = "Pres"
* myArray(2,0) = "Setpt"
* myArray(3,0) = "Gain"
* myArray(4,0) = "Int"
* myArray(5,0) = "Pos"
* ...and so on

If so then...

To put the values into ColsA:C

* For n = LBound(myArray) To UBound(myArray)
* * Cells(n + 1, 1) = myArray(n,0)
* * Cells(n + 1, 2) = myArray(n,1)
* * Cells(n + 1, 3) = myArray(n,2)
* Next

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


I misspoke calling it an array... it is just three columns of data,
VarName, TimeString and VarValue. I need to extract all the variables
for each time step.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default How to extract data from an array

Hi
This looks perfect for a pivot table.
1. Select your data
2. go to Data, pivot table
3. in Excel 2000 fill in the data range & after clicking Next you will
see a button for Layout. Click this and drag Time String heading to
the Row area, Var Name to the column area and Value to the data area.
This will give you a count of each TimeString/Var Name pair. Double
click each count and you will get a separate table for it.
Not quite what you asked for but may be useful.
regards
Paul

On Jan 31, 6:48*pm, jmccaski wrote:
I have an array with over 21,000 rows. I need to analyze this but have
not been able to get it out in a useful format yet. The data looks
like this:

VarName TimeString * * *VarValue
Pos * * 27.01.2011 12:49:35 * * 32
Pres * *27.01.2011 12:49:35 * * -2
Setpt * 27.01.2011 12:49:35 * * 100
Gain * *27.01.2011 12:49:35 * * 1
Int * * 27.01.2011 12:49:35 * * 10
Pos * * 27.01.2011 12:49:36 * * 32
Pres * *27.01.2011 12:49:36 * * -2
Setpt * 27.01.2011 12:49:36 * * 100
Pos * * 27.01.2011 12:49:37 * * 32
Pres * *27.01.2011 12:49:37 * * 9
Setpt * 27.01.2011 12:49:37 * * 100
Pos * * 27.01.2011 12:49:38 * * 32
Pres * *27.01.2011 12:49:38 * * 9
Setpt * 27.01.2011 12:49:38 * * 100
Pos * * 27.01.2011 12:49:39 * * 32
Pres * *27.01.2011 12:49:39 * * 24
Setpt * 27.01.2011 12:49:39 * * 100
Pos * * 27.01.2011 12:49:40 * * 32
Pres * *27.01.2011 12:49:40 * * 24
Setpt * 27.01.2011 12:49:40 * * 100
Gain * *27.01.2011 12:49:40 * * 1
Int * * 27.01.2011 12:49:40 * * 10

I need to extract it into a format something like this in order to
chart it:

TimeString * * * * * * * * * * Pos *Press Setpt Gain Int
27.01.2011 12:49:35 * * 32 * * *-2 * * *100 * * * * *1 * *10
27.01.2011 12:49:36 * * 32 * * *-2 * * *100
27.01.2011 12:49:37 * * 32 * * *9 * * * 100
27.01.2011 12:49:38 * * 32 * * *9 * * * 100
27.01.2011 12:49:39 * * 32 * * *24 * * *100
27.01.2011 12:49:40 * * 32 * * *24 * * *100 * * * * *1 * *10

Any help would be appreciated. I've burned up a couple of days so far
with little luck.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default How to extract data from an array

on 1/31/2011, jmccaski supposed :
On Jan 31, 1:06*pm, GS wrote:
jmccaski brought next idea :



I have an array with over 21,000 rows. I need to analyze this but have
not been able to get it out in a useful format yet. The data looks
like this:


VarName * *TimeString * * *VarValue
Pos * * * *27.01.2011 12:49:35 * * 32
Pres * * * 27.01.2011 12:49:35 * * -2
Setpt * * *27.01.2011 12:49:35 * * 100
Gain * * * 27.01.2011 12:49:35 * * 1
Int * * * *27.01.2011 12:49:35 * * 10
Pos * * * *27.01.2011 12:49:36 * * 32
Pres * * * 27.01.2011 12:49:36 * * -2
Setpt * * *27.01.2011 12:49:36 * * 100
Pos * * * *27.01.2011 12:49:37 * * 32
Pres * * * 27.01.2011 12:49:37 * * 9
Setpt * * *27.01.2011 12:49:37 * * 100
Pos * * * *27.01.2011 12:49:38 * * 32
Pres * * * 27.01.2011 12:49:38 * * 9
Setpt * * *27.01.2011 12:49:38 * * 100
Pos * * * *27.01.2011 12:49:39 * * 32
Pres * * * 27.01.2011 12:49:39 * * 24
Setpt * * *27.01.2011 12:49:39 * * 100
Pos * * * *27.01.2011 12:49:40 * * 32
Pres * * * 27.01.2011 12:49:40 * * 24
Setpt * * *27.01.2011 12:49:40 * * 100
Gain * * * 27.01.2011 12:49:40 * * 1
Int * * * *27.01.2011 12:49:40 * * 10
I need to extract it into a format something like this in order to
chart it:


TimeString * * * * * * * *Pos *Press Setpt Gain Int
27.01.2011 12:49:35 * * * *32 * * *-2 * * *100 * * * * *1 * *10
27.01.2011 12:49:36 * * * *32 * * *-2 * * *100
27.01.2011 12:49:37 * * * *32 * * *9 * * * 100
27.01.2011 12:49:38 * * * *32 * * *9 * * * 100
27.01.2011 12:49:39 * * * *32 * * *24 * * *100
27.01.2011 12:49:40 * * * *32 * * *24 * * *100 * * * * *1 * *10
Any help would be appreciated. I've burned up a couple of days so far
with little luck.


What's the structure of the array?

Is it something like:

* myArray(0,0)=[VarName]
* myArray(0,1)=TimeString
* myArray(0,2)=VarValue

so that:

* myArray(0,0) = "Pos"
* myArray(1,0) = "Pres"
* myArray(2,0) = "Setpt"
* myArray(3,0) = "Gain"
* myArray(4,0) = "Int"
* myArray(5,0) = "Pos"
* ...and so on

If so then...

To put the values into ColsA:C

* For n = LBound(myArray) To UBound(myArray)
* * Cells(n + 1, 1) = myArray(n,0)
* * Cells(n + 1, 2) = myArray(n,1)
* * Cells(n + 1, 3) = myArray(n,2)
* Next

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


I misspoke calling it an array... it is just three columns of data,
VarName, TimeString and VarValue. I need to extract all the variables
for each time step.


Extract how, and to where?

You could use AutoFilter to filter on Varname or TimeString Cols to
view by either. Otherwise, maybe Paul's suggestion might be a viable
alternative.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to extract data from an array

On Jan 31, 1:20*pm, Paul Robinson
wrote:
Hi
This looks perfect for a pivot table.
1. Select your data
2. go to Data, pivot table
3. in Excel 2000 fill in the data range & after clicking Next you will
see a button for Layout. Click this and drag Time String heading to
the Row area, Var Name to the column area and Value to the data area.
This will give you a count of each TimeString/Var Name pair. Double
click each count and you will get a separate table for it.
Not quite what you asked for but may be useful.
regards
Paul

On Jan 31, 6:48*pm, jmccaski wrote:

I have an array with over 21,000 rows. I need to analyze this but have
not been able to get it out in a useful format yet. The data looks
like this:


VarName TimeString * * *VarValue
Pos * * 27.01.2011 12:49:35 * * 32
Pres * *27.01.2011 12:49:35 * * -2
Setpt * 27.01.2011 12:49:35 * * 100
Gain * *27.01.2011 12:49:35 * * 1
Int * * 27.01.2011 12:49:35 * * 10
Pos * * 27.01.2011 12:49:36 * * 32
Pres * *27.01.2011 12:49:36 * * -2
Setpt * 27.01.2011 12:49:36 * * 100
Pos * * 27.01.2011 12:49:37 * * 32
Pres * *27.01.2011 12:49:37 * * 9
Setpt * 27.01.2011 12:49:37 * * 100
Pos * * 27.01.2011 12:49:38 * * 32
Pres * *27.01.2011 12:49:38 * * 9
Setpt * 27.01.2011 12:49:38 * * 100
Pos * * 27.01.2011 12:49:39 * * 32
Pres * *27.01.2011 12:49:39 * * 24
Setpt * 27.01.2011 12:49:39 * * 100
Pos * * 27.01.2011 12:49:40 * * 32
Pres * *27.01.2011 12:49:40 * * 24
Setpt * 27.01.2011 12:49:40 * * 100
Gain * *27.01.2011 12:49:40 * * 1
Int * * 27.01.2011 12:49:40 * * 10


I need to extract it into a format something like this in order to
chart it:


TimeString * * * * * * * * * * Pos *Press Setpt Gain Int
27.01.2011 12:49:35 * * 32 * * *-2 * * *100 * * * * *1 * *10
27.01.2011 12:49:36 * * 32 * * *-2 * * *100
27.01.2011 12:49:37 * * 32 * * *9 * * * 100
27.01.2011 12:49:38 * * 32 * * *9 * * * 100
27.01.2011 12:49:39 * * 32 * * *24 * * *100
27.01.2011 12:49:40 * * 32 * * *24 * * *100 * * * * *1 * *10


Any help would be appreciated. I've burned up a couple of days so far
with little luck.


The pivot table worked perfectly. I had never used one before. I did
need to "copy" the table into another sheet as data in order to
manipulate it, but having done that I was able to chart everything.

Thanks!!!
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to extract data from an array

On Jan 31, 1:31*pm, GS wrote:
on 1/31/2011, jmccaski supposed :



On Jan 31, 1:06*pm, GS wrote:
jmccaski brought next idea :


I have an array with over 21,000 rows. I need to analyze this but have
not been able to get it out in a useful format yet. The data looks
like this:


VarName * *TimeString * * *VarValue
Pos * * * *27.01.2011 12:49:35 * * 32
Pres * * * 27.01.2011 12:49:35 * * -2
Setpt * * *27.01.2011 12:49:35 * * 100
Gain * * * 27.01.2011 12:49:35 * * 1
Int * * * *27.01.2011 12:49:35 * * 10
Pos * * * *27.01.2011 12:49:36 * * 32
Pres * * * 27.01.2011 12:49:36 * * -2
Setpt * * *27.01.2011 12:49:36 * * 100
Pos * * * *27.01.2011 12:49:37 * * 32
Pres * * * 27.01.2011 12:49:37 * * 9
Setpt * * *27.01.2011 12:49:37 * * 100
Pos * * * *27.01.2011 12:49:38 * * 32
Pres * * * 27.01.2011 12:49:38 * * 9
Setpt * * *27.01.2011 12:49:38 * * 100
Pos * * * *27.01.2011 12:49:39 * * 32
Pres * * * 27.01.2011 12:49:39 * * 24
Setpt * * *27.01.2011 12:49:39 * * 100
Pos * * * *27.01.2011 12:49:40 * * 32
Pres * * * 27.01.2011 12:49:40 * * 24
Setpt * * *27.01.2011 12:49:40 * * 100
Gain * * * 27.01.2011 12:49:40 * * 1
Int * * * *27.01.2011 12:49:40 * * 10
I need to extract it into a format something like this in order to
chart it:


TimeString * * * * * * * *Pos *Press Setpt Gain Int
27.01.2011 12:49:35 * * * *32 * * *-2 * * *100 * * * * *1 * *10
27.01.2011 12:49:36 * * * *32 * * *-2 * * *100
27.01.2011 12:49:37 * * * *32 * * *9 * * * 100
27.01.2011 12:49:38 * * * *32 * * *9 * * * 100
27.01.2011 12:49:39 * * * *32 * * *24 * * *100
27.01.2011 12:49:40 * * * *32 * * *24 * * *100 * * * * *1 * *10
Any help would be appreciated. I've burned up a couple of days so far
with little luck.


What's the structure of the array?


Is it something like:


* myArray(0,0)=[VarName]
* myArray(0,1)=TimeString
* myArray(0,2)=VarValue


so that:


* myArray(0,0) = "Pos"
* myArray(1,0) = "Pres"
* myArray(2,0) = "Setpt"
* myArray(3,0) = "Gain"
* myArray(4,0) = "Int"
* myArray(5,0) = "Pos"
* ...and so on


If so then...


To put the values into ColsA:C


* For n = LBound(myArray) To UBound(myArray)
* * Cells(n + 1, 1) = myArray(n,0)
* * Cells(n + 1, 2) = myArray(n,1)
* * Cells(n + 1, 3) = myArray(n,2)
* Next


--
Garry


Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


I misspoke calling it an array... it is just three columns of data,
VarName, TimeString and VarValue. I need to extract all the variables
for each time step.


Extract how, and to where?

You could use AutoFilter to filter on Varname or TimeString Cols to
view by either. Otherwise, maybe Paul's suggestion might be a viable
alternative.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Thanks for the reply. The pivot table did the job.

Regards
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default How to extract data from an array

Hi Paul,

Just want to say thanks for the clear, concise instruction. I too have
never used Pivot Table and so I decided to try your suggestion using
the OP's data. I was in xl10 and so the wizard is slightly different
but you instructions were clear enough to follow and so was no problem.

Works beautifully!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default How to extract data from an array

Thanks - careful though, Pivot tables are addictive!
Paul

On Feb 1, 1:58*am, GS wrote:
Hi Paul,

Just want to say thanks for the clear, concise instruction. I too have
never used Pivot Table and so I decided to try your suggestion using
the OP's data. I was in xl10 and so the wizard is slightly different
but you instructions were clear enough to follow and so was no problem.

Works beautifully!

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


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
Extract multiple values from array vpinnell Excel Discussion (Misc queries) 2 October 28th 09 02:39 AM
Extract a column/row from a 2-D array Fred Chow Excel Programming 1 October 13th 07 06:46 PM
Tying to extract all data from a pivot pulling from external data Ted Urban Excel Discussion (Misc queries) 3 September 14th 07 10:50 AM
How do I extract a single value from the linest array result? hil Excel Worksheet Functions 3 July 12th 06 12:37 PM
How do I extract hyperlink as text from an array of hyperlinks? Hoya Excel Worksheet Functions 8 December 29th 05 05:16 PM


All times are GMT +1. The time now is 08:45 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"