ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Invoking macro to insert rows according to DDE imported data (https://www.excelbanter.com/new-users-excel/144418-invoking-macro-insert-rows-according-dde-imported-data.html)

chainastole

Invoking macro to insert rows according to DDE imported data
 
There is a DDE compatible stream of data. I want this data be inserted (row
insertion) at the top of the worksheet each time the imported data is
different from that stored in the worksheet. The beneath rows should be
shifted 1 row down, thus making some sort of shift register with most recent
data on top, less recent below, etc.
How may I do that?

JLatham

Invoking macro to insert rows according to DDE imported data
 
Short answer:
You are going to have to capture the information as it comes in, then
compare it with existing data on the sheet to see if it is different. If it
is different, then you simply use a line of code like
Range("A1").EntireRow.Insert
which will push all the older data down 1 row. Then place the captured data
into the newly created row. We're talking about some VBA coding here,
obviously.

The details of doing all of this depend on how things are being done with
your DDE stream now. Since I am DDE-ignorant, I've stayed out of this
discussion for 3 days, because you're going to probably ask "how do I do what
you said", and because I don't know how things are working at your end right
now, I don't have an answer for that.

"chainastole" wrote:

There is a DDE compatible stream of data. I want this data be inserted (row
insertion) at the top of the worksheet each time the imported data is
different from that stored in the worksheet. The beneath rows should be
shifted 1 row down, thus making some sort of shift register with most recent
data on top, less recent below, etc.
How may I do that?



All times are GMT +1. The time now is 12:00 AM.

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