Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
wfc wfc is offline
external usenet poster
 
Posts: 3
Default Formatting Data Columns of various length with Macros

Hi,

I need help in writing a Macro that can format data that has been
brought in to the spreadsheet using winwedge pro and a DDE.

I have only been working with macros for the last week and so far have
just only been able to get the input with the DDE working.

I am using Excel 2000.

To give beackground information i have a micro controller feeding out
data on to a serial port and then i use win wedge to put the data in to
excel using the DDE in a macro.

For each test the data puts out 3 sets of data. 1 displacement array
and 2 acceleration arrays(from 2 seperate accelerometers).
what happens it that for every change in displacement the
microcontroller records the displacement a reading from accerometer 1
and a reading from accelerometer 2.

once the test is finished either by reaching 2500 displacement values
or being timed out the micro controller will output the data on to the
serial port.

it will come out in to excel like this
each new line in a new column,

100
98
98
65
23
end
600
500
600
655
400
end
600
528
655
455
322
end

now this test is just a short one of 5 displacement values, then 5
acceleration values from accelerometer 1 and 5 acceleration values form
accelerometer 2. the first displacement value corresponds to the first
acceleration value from each accel array and so-forward.

Now the issue i have is that the size of these tests are always
different and can be anywhere up to 2500 displacement values long
(making the whole data column 7500 values long.

what i need to make is a macro that after the DDE has placed the data
in the spreadsheet it will find the first "end" and cut from that cell
down to the bottom of the data series and paste it in the next column
and then delete the "end" to allign the data points. Then it will need
to perform the operation again in this second column to make a 3rd
column.
once it has performed that i need to the top of the 4th column to wait
for a next set of data to do it all again.

so the end result would have the data looking like this

100 600 600
98 500 528
98 600 655
65 655 455
23 400 322



these 3 data arrays will always be the same length as each other in the
single test, but the test sizes can change.
Eg. test 1 above has 5 points, but test 2 may have 2500 points.

i have tried recording a macro to do this however i am unsure what
steps to take to make it always cut from the first "end" down while
taking in to account different test sizes as the macro only cuts and
pastes from referencing cell positions.

thanks
Warren

  #2   Report Post  
Posted to microsoft.public.excel.programming
wfc wfc is offline
external usenet poster
 
Posts: 3
Default Formatting Data Columns of various length with Macros

Sorry this should have read ROW not column

it will come out in to excel like this
each new line in a new ROW,

100
98
98
65
23
end
600
500
600
655
400
end
600
528
655
455
322
end


  #3   Report Post  
Posted to microsoft.public.excel.programming
wfc wfc is offline
external usenet poster
 
Posts: 3
Default Formatting Data Columns of various length with Macros

anyone able to help me with this?

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
Comparing different length columns OperationsNETTC15 Excel Discussion (Misc queries) 3 June 11th 09 05:32 AM
pre-set the length of columns Dave[_8_] New Users to Excel 1 September 6th 08 04:07 PM
How can I cut data out of HTML table, into msExcel and just take the data & columns? (but NOT the formatting & URLs!) ship Excel Discussion (Misc queries) 24 April 25th 06 06:02 PM
different length columns dsal Excel Discussion (Misc queries) 5 July 5th 05 06:27 PM
Data from multiple variable length columns to one column Robert[_14_] Excel Programming 4 October 17th 04 10:25 PM


All times are GMT +1. The time now is 04:53 PM.

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"