+ Reply to Thread
Results 1 to 3 of 3

Automatically Move to a New Column

  1. #1
    Registered User
    Join Date
    03-27-2008
    Posts
    2

    Automatically Move to a New Column

    I am using Excel as a temporary data logger. I know that it is not the best thing to use, but when the wheels of progress move slowly, you need to accommodate.

    Anyway, the data logger enters the data every second (date in one column, the data in the second column), moves to the next row and enters the next pair of numbers. I would like to continuously log data over long periods of time - say 24 hours or more. Well just do the math - in less than one day, all rows in a set of columns will be filled with data.

    I would like to automatically switch to another column and continue the data logging when the data reaches a specific row.

    I am familiar with VBA programming. I have done a little with event programming - which I think would apply here.

    Any help would be greatly appreciated.

    Steve

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Steve,

    Welcome the Forum!

    You don't mention where the data is coming from, so I can't really say if an event driven macro is what you need. Here is a code example to check which row you have written to and also checks if the worksheet has enough columns.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    03-27-2008
    Posts
    2
    Leith,

    Thanks so much. You got me going in the right direction. With a little tweak, I got it to work the way I needed. Here is my final version:

    Please Login or Register  to view this content.
    I have an external controller that is connected to a laptop. The controller is receiving data from a measuring device. The software on the laptop receives the data from the controller and transfers it to Excel -- I don't how it does it; I just accept that it does. Eventually the data will go through a PLC and will get captured in a data Historian (a SQL database), so the laptop won't be needed. This is just a temporary fix.

    Unfortunately, this may not be of any use to me. I have been using Excel 2003, but had to buy a copy of Excel 2007 for the laptop. I did not know that Excel 2007 had 1,048,576 rows. It would take me 12 days to reach the end of a column! I will still use the code anyway. Never know if we want to make a long run.

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1