Email:      Pass:    Pass?
Close Window   
Free Ebook
Get Your Free Excel
Our Top 15 Excel Tutorials
Instant Access!
Subscribe for Free Excel tips & more!


Free Excel Forum

Programming Live Feed Data

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

hello everyone, i am just learning vba and my ideas are way ahead of my vba programming capabilities. here is my new idea, something i hope is possible with vba:

i import live feed data into excel spreadsheet from my trading program, and it looks something like this "=TOS!msft" in each cell.

so if i have a few cells in the first row of such data, which changes maybe every second (sometimes more often) there a way for VBA to look for any changes (in any of the cells) and if it spots a change, it pushes the values before the change took place to the 2nd row, so the "freshest" data is on the first row. and once that changes again, it'll push that to the 2nd, and the 2nd row to the 3rd...and just do this all day long and make a little database.

i dont even know where to begin with something like this, so hopefully someone will be able to tell me if this is possible and if it is, how difficult of a project it would be.

thank you all!

View Answers     

Similar Excel Video Tutorials

Helpful Excel Macros

Excel Macro to Save a Specific Worksheet as a New File
- This Excel Macro allows you to save a specific worksheet within the Excel Workbook to its own new file. You will be a
Macro to add a New Line to Message Box Pop-up Windows in Excel
- This is a very simple Message Box, pop-up window, macro for Excel that illustrates how to put new lines, the same thi
Save the Current Worksheet as a New Excel Workbook File
- This Excel Macro will save the currently visible/active worksheet (the one that you see when you run the macro) to a
Excel Macro that Searches Entire Workbook and Returns All Matches
- This is the ultimate Lookup Macro for Excel. It will search every worksheet in the workbook and return all of the mat
Basic Web Query in Excel - Import Data from the Web into Excel
- Import data from the web into Excel with this macro. This is a basic web query macro that will import data from any web

Similar Topics

Hello all,

First post here and also a new Excel user so please forgive me if I use incorrect terminology! Ok, so here goes. I'm trying to teach myself how to trade forex, and as part of my ongoing attempts to become profitable I am trying to analyse some of the price data in excel. I've managed to set up a live feed into Excel from my trading software using a DDE? Which works and is great but it just gives me current prices for the currency pairs and that's all.

So, my question is - Is there a way to take data from the live feed say, every hour, and form a table? Like a table that shows the prices for the last 24 hours and constantly updates itself? I'll leave it there for now and see if you guys and girls have any ideas. Thanks in advance,



>>>>Excel 2003 - snapshot of live data feed

We have an Excel 2003 spreadhseet that contains a live feed from reuters and updates regularly. My boss has asked if we can get an automated snapshot of the spreadsheet every evening at 5pm! So withpout manually capturing a JPEG using Snagit or something like that - I am unsxure how to autiomate this one - any ideas guys?!!!


My knowledge of excel programming and macros is very basic and I have been scratching my head trying to get to grips with the following problem.

I have a live stock data feed into an excel spreadsheet with nearly 1200 rows (ie. one for each stock code). There are 5 columns of data for each stock under the row 1 headings of Open, High, Low, Last and Volume. This is set up and working fine. I then want another softare charting program (Amibroker) to read the data. For this each cell containing data needs to be named in the following format eg. "BHP_last" or "BHP_volume" (ie. a combination of row or stock name and column name with an underscore separating these two elements. I can do this on a cell by cell basis, and Amibroker reads the data fine, but I don't want to have to do this 6000 times. I need some sort of macro that will automate this process. I don't need to name the first column which is the stock name or the first row which is the column name, but all the cells containing data. Can someone help?



Hi guys,

I new to excel so bear with me. I'm not sure if someone here uses MT4 and excel.

I can get live data from a Metatrader forex chart through DDE link to excel, for me to get live data streaming into excel I need to put these code in indivdual cells:


But what I want to do is to record this live data into excel so I can use this data to manipulate later on such as build different time candles etc...

I really want to download past meta trader history and Metatrader history is there to download but I not sure if I can run it together with the live feed to get a continuous stream of data with looking at past history, also not sure if this is truly difficult to do in excel.

Anyway I hope I make sense

Hello everyone, my first posting here (and I truly hope I have searched the forum hard enough to NOT replicate a request)

I have two worksheets (see attachment), one is a template, the other contains live data. I need to fill in the empty column in the template worksheet with data from the "live data" worksheet.
"Live data" contains column "Identifier" which is the only unique piece of information to match the equivalent on "template". To complicate things, each person on the "template" is only listed once, while on "live data" each person can be listed several times and amounts need to be added up before being entered into "template".

Clear as mud? I hope not and thanks in advance.

I want to use Chip Pearson text import code from:

I see that I can feed the text file names to the subroutine by using
the code: ImportTextFile "c:\temp\test.txt", ";".

This is an easy programming question, but how do I feed the sub several
text file names derived from cells in a column, that don't have the
file extension ".txt" appended? I see that VBA is somewhat like
functions, but can I just say: ImportTextFiles ("h:\textfiles\" & D47 &
" "), " " to have it import a text file from the h:\textfiles\
Directory with the name of whatever the name is in cell D47 to the
active cell?

I need VBA code that records the number of times a cell in a worksheet has a value change.

For example if cell J5 contains the live feed, if thatl value is changed to this would be recorded as 1 in the cell using the recording function. If that Cell value is then changed to 11, the cell change would be recorded as 2.

I'm really new to all this code stuff so help would be very much aprreciated.

I've tried using this and lsight variations, but none have worked:

Private Sub Worksheet_Calculate()
Static OldVal As Variant

With Range("B3")
    Application.EnableEvents = False
    If .Value <> OldVal Then
        .Offset(, 4).Value = Target.Offset(, 4).Value + 1
    End If
    Application.EnableEvents = True
End With

I have a two worksheet workbook. Currently I am using various configurations of VLOOKUP to provide data into various cells from one worksheet to the other.

e.g. =VLOOKUP(B2,INDIRECT("'Midwich-Feed'!$B:$Q"),4,0)

How do I rewrite this formula so that the value matched in the other cell/worksheet is placed in the target cell without having a live link to the other worksheet. I still need it to look up the value in the other worksheet using either VLOOKUP or equivelant but I want the value to pasted in as a value not as a live link.

Only when I click a vba button do I want it to go away and refresh the values where necessary.

Does that make any sense?



Good day all,
I hope I can gain some assistance from you guys in relation to this subject.

I have a dynamic data feed into excel (cell references a1 to h1).
The width of this data feed is static. However the depth differs, because the feed has 3 parts, and each part can be a different depth, depending on the amount of rows contained in each part of the data feed.

I cannot segregate the data feed into 3 separate entities.

I have some cells immediately to the right of this feed. These cells have formulas and formatting in them that relate to the corresponding rows in the data feed in each section.

My problem is that when the data feed updates and displays a large amount of data in any section, my cells containing the formulas and formatting to the right of the feed becomes mis-aligned with the corresponding row of the data feed, and the formula references loose their source/target.(Absolute referencing does not fix this problem).

Is there a way I can lock my cells on the right to each data feed section so they align to the corresponding row in the data feed?

To start with:
first data feed contains 10 rows.
second data feed contains 10, and
third data feed contains 10 rows.

When the data is updated, i could have section 1 with 15 rows, section 2 with 9 and section 3 with 12. I want my formulas and formatting to shrink and/or grow with the depth of each section.

I hope I explained it Ok? Please assist if possible..

I have created a worksheet_calculate formula and it keeps giving me a headache... hope you can help
In my spreadsheet I am having live stock market data linked into the spreadsheet. On a separate worksheet I have an if statement that goes something like this...
cell B4 is the stocks price and it keeps updating every second (because it's a live feed)
I have the if statement and worksheet_calculate in sheet2 (seperate from the live data feed)

The worksheet_calculate is simply this...

Private Sub Worksheet_Calculate()
Worksheet_Change Range("$A$1")
End Sub

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = Range("$A$1").Address Then
If Target.value = True Then
MsgBox "Buy"
End If
End If
End Sub

This does work however because the stock price (cell B4) keeps updating it keeps updating the if statement over and over again and causing the worksheet_calculate to fire off a million "Buy" Message boxes.
Is there a way to only have one message box pop up when the price goes over $15?
Thanks for your help

I have dynamic data that is automatically updated by a live feed. It updates cells m3:m32.

I currently have a code that plays a sound whenever a value in any of the cells is greater than a certain threshold and another code that plays when any of the cells goes below a certain threshold.

The problem is the sound continues to play each time the live feed is updated and the cell condition is correct.

I want the sound to play once for example when a cell value first goes less than 4, but then dont play again if it continues to be under 4. However, if a new cells value goes to less than 4, I want the sound to play.

The problem at the moment is my code limits the sound to play once but it applies to the total cell range not the individual cells so if a 2nd cell's value drops below 4 it wont play.

I have a spreadsheet that currently has a DDE link to live prices that are updated constantly (up to 3 times a second, possibly more).
There are 5 cells on the spreadsheet, A1:A5, and when A1 updates I have a macro that copies the value of all 5 to a , so building up the history of prices. That seems to work fine, but when I add some extra calculations (such as dynamic ranges for charts) the spreadsheet slows down, and I miss some of the live feed prices.
Is it possible to use the RTD function (which I believe temporarily stores unused data) with the feed I have for DDE (MT4|Dax!Last)

good morning - I've got a spreadsheet that I'm interested in applying a find a replace function to. I'm not even sure Excel does this (let alone VBE), but I thought I'd ask anyway. The information below is an example of what I have throughout one column:

ZINC INFO:\n2-1 3/4'SL\n2-MTTB\n2-DD\n2-MRB\n\nProp Size: 26L/R26 (3 Blades)\nOTHER:

The program that I'm loading the data from inserts "\n" for a line feed, and I'd like to be able to find and replace the "\n" with a line feed (within the cell) when it finds "\n". Does anyone know of a way to do that?

Thanks in advance, and happy Monday!


I've been working on this for hours now and i'm getting no where fast.

Basically what I am trying to do is a summary of numerical values, based on several conditions.

column a column b column c
local loop live cross connect
loop A cancel 100
long haul live 10000
long haul pend canc 1000
loop Z live 100
x-conn live cross connect

In column a, i have several choices and i want to focus on those choices that fall into column B "live" or "pend canc" and then only have numerical data in column C

I've tried several different formulas like

=SUMPRODUCT((a30:a38="Loop A")*(a30:a38="Long Haul")+(b30:b38="Live"),cX30:cX38)

I know the result of this should be 111000 but it's not working...I usually get n/a. I know about using cntl-shift-enter to use the formula properly.

I can get one variable to sum up properly using =SUMIF(M9:M21,"Live",BW9:BW21)

but, that leaves out anything that is pend-canc

I have also tried =SUM(IF((a9:a21="long haul")*(b9:b21="live"),cX9:cX21)) which gives back a value that is accurate...

However, i can only choose one variable per column.. (I can't choose "long haul" and "local loop" for column A, and I can't choose "live" and "pend-canc" for column B). So, this isn't giving me the full total of what I need.

If you want, i can send you an better example via e-mail not sure I can embed an excel file here!

Thanks in advance =)

looking for some vba excel code that does the following

document 2 worksheets

sheet 1 called "master project register" which has hundred rows (project names) and 6 columns named as follows

column a = project name
column b = segement
coumn c = date
column d = go live
column e = project close
column f = live project

sheet 2 is called "import to project " and has only the above headings from column a to f

i want to do the following in excel for each row in master project register worksheet

1. if column F = Yes
than do the following

note if doesnt = yes than move onto next row etc

2. copy row and paste into "import to project " workseet
3. ihighlight row 2 and insert2 rows directly beneath the pasted data.
4. in column a in first empty row in cell a2 write " go live" column a in second empty row in cell a3 write " project close"
6. copy the segment name down from b1 into b2 and b3

7.copy d1 into c2

8.copy e1 into c3

9. highlight row 1 and insert empty row ( ready for the next set of data to be inserted)

the above code will repeat steps for every project in the master worksheet looking for any "yes" in column f and repeating steps 2-9

appreciate your help guys.... im sure this is achievable....

if anyone knows also how to write message at end to say " you have pasted x number of projects"

x = projects with "Yes" in column F

Hello Everyone,
I need your help desperately.....

I am trying to take data from the same five cells from 145 Workbooks into one master Workbook. My wife created an Invoice for each customer using an excel template and labeled them Invoice 001 to 145.

I want the cells "A16", "G15", "H36", "H37", "H38" from workbooks labeled "Invoice 001.xls" to "Invoice 145.xls" to feed column "B2", "C2", "D2", "E2", "F2" in Workbook "Income Statement Sheet.xls"


I want the cells "A16", "G15", "H36", "H37", "H38" from work book "Invoice 001.xls" to feed column "B2", "C2", "D2", "E2", "F2" in Work Book "Income Statement Sheet.xls"


I want the cells "A16", "G15", "H36", "H37", "H38" from work book "Invoice 001.xls" to feed column "B3", "C3", "D3", "E3", "F3" in Work Book "Income Statement Sheet.xls"


I want the cells "A16", "G15", "H36", "H37", "H38" from work book "Invoice 001.xls" to feed column "B4", "C4", "D4", "E4", "F4" in Work Book "Income Statement Sheet.xls"

Etc Etc until data from all 145 Invoice Workbooks is in "Income Statement Sheet.xls" I tried doing a loop but I am afraid I am too stupid to get this done. I want to run the macro each time she creates a new Invoice for her customer. Any help would be greatly appreciated since we are trying to get ready for tax time.

Thanks in advance.

I have a spreadsheet that is pulling data from a continuous DDE feed over the web and performing some simple calculations and outputing a series of numbers. This works fine and provides continuous data.

I want to be able to take the data that excel gives me and export it to another worksheet that will be shared on numerous computers. When I try to link the cells to another worksheet that does not have the DDE feed, then it will not give any results. If I try and "Insert > Object" into another sheet, it also tries to reference the DDE links.

Is there a way to mirror the data provided in a certain cell and then continuously export this somewhere? I just want a "dummy" sheet that will give me a feed from the other sheet.

Any help would be greatly appreciated!

Hi everyone,
I'm brand new to programming in Excel, and currently building a system that will help me trade equity options (similar to trading stocks). So far, I've put together the ranking system I want to use based on a live data feed that updates in real-time (during market hours). For every possible trade in my 'universe' (currently about 600), Excel provides a live score (based on my formulas and weightings) as well as prices and other info about the trade (options strikes, symbols, expected return, etc.).

What I'd like Excel to be able to do is keep a separate sheet where a trade (row) that scores over an arbitrary threshold, say, 100 'points,' is recorded as a static line (instead of continuing to dynamically update), like a snapshot of that line. I'll use this list of trades to submit to my broker for trading.
If it was as simple as a 'triggered' copy - paste special - values, that would do just fine. The trigger would also need to see if that trade has already been recorded for the day, so I don't get an infinite list of the same trade.

After a trade makes it into this list, I'll need to compare it to what I already have in my portfolio (which I'll also need to build) so I don't become too heavily weighted in any one trade. (Just thought I'd let you know where this will be going, too).

I'm sure I left out some important details, so please ask away! Thanks for your help!


change extension in vba

i am a positive rookie and i need help.
i know a little programming but i understand it even i dont write anything.
i know is wrong what i write here but i express my idea on how i want it to be.


Sub gugu()
    var a;
    If a = ".pas" Then Change to ".txt"
    Range("B5") = "a"
    End Sub

how can it be done? (in the wright way?)
sorry for this but i really want to make it work.

change extension in vba

i am a positive rookie and i need help.
i know a little programming but i understand it even i dont write anything.
i know is wrong what i write here but i express my idea on how i want it to be.


Sub gugu()
    var a;
    If a = ".pas" Then Change to ".txt"
    Range("B5") = "a"
    End Sub

how can it be done? (in the wright way?)
sorry for this but i really want to make it work.

I'm not really sure if this would go under "General" or "Programming", but here goes a shot. I've never really used Excel before for anything serious. Anyways, in my current job I'm MIS Director for a small online retailer, and most of my day consists of running various reports sent to me via Excel against either Access or SQL back-ends for business operations.

In Excel 2007 I know how to import data from an external source (in this case, an Access database, but more often than not it's against a SQL Server instance). However, my current problem is thus: I have an Excel spreadsheet with some 7,000 product IDs in them, and I wish to check their price and run some minor calculations. While for this particular project I could easily import it into Excel and run a query, I'm thinking long-term.

Is there any way to filter imported data (i.e. a WHERE clause) based on the value of an Excel column? e.g. tell Excel (in pseudocode): "Import data from this Access database, for each row match up the ProductID in the database with the value of column 'A', and insert its corresponding Price value into column 'B'". I'm not seeing a way to do this, and it would make my job so much easier if I didn't have to import into SQL Server or Access, run queries and export back to another Excel file.

Hello! I have been tasked with a major project at work and I don't know where to start! Within my job we work with a very large excel spreadsheet on a daily basis. Within the spreadsheet that maintains lists of "activities" that assign to certain people. I would like to figure out how I can make a fill in box at the top so people can choose one certain line item and it will populate the owner....example (not real) below

Feed Dog Joe
Water Cat Linda
Scrape Driveway Bob
Do Dishes Mary

Each of those are in their own cell and in 4 different rows. I would like to have something at the top of the sheet where someone can choose "Feed Dog" and the spreadsheet would fill in "Joe".

Any ideas?!

I have a cell value based on a calculation,which gives me any one of 7
values.The cell values a -"DEAD","DEAD & DEAD","DEAD & LIVE","LIVE &
DEAD","LIVE","LIVE & LIVE",BLANK CELL. I would like to apply conditional
format of that cell-"DEAD" word to red bold font 11 with a color shade,and
"LIVE" word to blue bold font11 with the same color shade.Since I can apply
only three conditions and a cell value can't accept two formats at a time,I
am unable to do the task.Can any one suggest me how to do this.

Hi all,
Sorry for the long post.
I'm a long time 123 person with pretty advanced capabilities using Lotus scripts and macros and accessing remote data.
I'm making the transition to Excel and finding it pretty good. Discovered things I couldn't do in 123 so It's been a good experience.
There's one 123 thing I can't live without so I'm hoping I can find the equivalent in Excel. I've looked and looked but can't find a solution.
Here's what I do in 123.
I use a macro to connect to a remote table on my PC that is dbaseIV format.
Typical syntax:
{DATABASE-CONNECT "dBASE_IV";;;;"c:\CntralData";;;;"dardata";"dardata"}
Once this is done I then use SQL in the 123 cells to collect desired data.
Typical statement:

The beauty of this versus Excel Query is I can set a column of reference values in the spreadsheet and fetch data from the remote table that has a match. Can't find a way to do this in Excel.

Please don't respond unless you know an equivalent in Excel or to clarify the question. I'm not interested in "other" ways. You know "old dog, new tricks"

Is there a way to extract data from an RSS feed to Excel? I'd like something that takes the RSS feed, and for each post, adds a new row, and in columns puts
The Date
the Time
the Subject
The body of the text

Is this possible? Ideas or specific references appreciated. I'm very new to Macros and VBA, but fairly computer/programming savvy. Simple is good.