+ Reply to Thread
Results 1 to 16 of 16

Plot Excel graph from a cell value which changes every minute

  1. #1
    Registered User
    Join Date
    09-04-2009
    Location
    York
    MS-Off Ver
    Excel 2003
    Posts
    10

    Plot Excel graph from a cell value which changes every minute

    Hi guys,

    I have a very basic excel sheet set up which pulls in a value from a website (Data --> From Web --> Select the table and click OK).

    The website it pulls from refreshes its data every 10 seconds. I have set the spreadsheet to refresh the cell data every minute (I think this is the minimum refresh interval you can set).

    So as it stands I have a single cell on my spreadsheet with an integer in it, which refreshes every minute (when the excel web query runs) and it populated by the latest value it pulls back.

    Is there an "easy" way to use this to plot the value of this cell over time so we can keep track of the value on a "real time" graph ?

    Any help would be much appreciated.

    Many thanks in advance

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Plot Excel graph from a cell value which changes every minute

    Hi,

    I would suggest a macro.

    For example:
    1. Setup a (hidden if you wish) worksheet, call it Sheet2
    2. Place the following code into the worksheet module for your constantly-updating worksheet (call it Sheet1, with the updating value in cell A1):
    Please Login or Register  to view this content.
    NB: To bring up the worksheet module (if you are unfamiliar with VBA), right click on the worksheet tab when in spreadsheet view, and select "View Code".
    3. Setup a named range, call it "ChartRange", and use the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4. Setup your chart, and in the value range, enter the following range:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Hope this helps

  3. #3
    Registered User
    Join Date
    09-04-2009
    Location
    York
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Plot Excel graph from a cell value which changes every minute

    Quote Originally Posted by ajryan88 View Post
    Hi,

    I would suggest a macro.

    For example:
    1. Setup a (hidden if you wish) worksheet, call it Sheet2
    2. Place the following code into the worksheet module for your constantly-updating worksheet (call it Sheet1, with the updating value in cell A1):
    Please Login or Register  to view this content.
    NB: To bring up the worksheet module (if you are unfamiliar with VBA), right click on the worksheet tab when in spreadsheet view, and select "View Code".
    3. Setup a named range, call it "ChartRange", and use the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4. Setup your chart, and in the value range, enter the following range:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Hope this helps

    This is excellent thankyou very much !!

    As an aside from this, I was wondering if it would be possible to amend the Sub Worksheet code in (2.) so that aswell as populating the changing value in column A, it also posts a timestamp for each entry (in Column B perhaps using the =NOW() function or similar)

    Apologies as I have practically 0 VB knowledge I know what I want to do in my head but translating it to code is my downfall haha

    So ultimately, the function would post the changing value in Column A2 for example and in B2 there would be a timestamp (using =NOW() or similar).. The sheet would refresh again after a minute and A3 would be populated with the next "changing value" figure and B3 would contain the new timestamp

    Again thanks in advance.

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Plot Excel graph from a cell value which changes every minute

    Sure no problems!

    Use this Worksheet_Calculate subroutine instead:
    Please Login or Register  to view this content.
    This will actually put your timestamp in Column A on Sheet2 so that it can be used as a timeline for your x-axis if you wish (which I supposed is why you were asking for this to occur). You will also need to change your "ChartRange" named range to incorporate this new column, so it will become
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hope this helps

  5. #5
    Registered User
    Join Date
    09-04-2009
    Location
    York
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Plot Excel graph from a cell value which changes every minute

    That works brilliantly.

    Thanks very much, exactly what I was after. Much appreciated.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Plot Excel graph from a cell value which changes every minute

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  7. #7
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Plot Excel graph from a cell value which changes every minute

    No worries

    Please don't forget to click on the * next to my post(s) just to say thanks

  8. #8
    Registered User
    Join Date
    05-18-2017
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Plot Excel graph from a cell value which changes every minute

    Quote Originally Posted by ajryan88 View Post
    Hi,

    I would suggest a macro.

    For example:
    1. Setup a (hidden if you wish) worksheet, call it Sheet2
    2. Place the following code into the worksheet module for your constantly-updating worksheet (call it Sheet1, with the updating value in cell A1):
    Please Login or Register  to view this content.
    NB: To bring up the worksheet module (if you are unfamiliar with VBA), right click on the worksheet tab when in spreadsheet view, and select "View Code".
    3. Setup a named range, call it "ChartRange", and use the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4. Setup your chart, and in the value range, enter the following range:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Hope this helps
    Every time the cell updates the new value is written 86 times to sheet 2. What am I doing wrong?

  9. #9
    Registered User
    Join Date
    05-18-2017
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Plot Excel graph from a cell value which changes every minute

    Hello:

    Can you post more steps on how to run this macro? I think my main issue is in setting up the named range. I have not been able to get this to run the way it is described.

    Thank You,

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Plot Excel graph from a cell value which changes every minute

    Mech.Eng. welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  11. #11
    Registered User
    Join Date
    12-10-2019
    Location
    india
    MS-Off Ver
    2007.2010
    Posts
    3

    Re: Plot Excel graph from a cell value which changes every minute

    I want same ... but i don;t know where to place code... on sheet 1 or sheet 2.... can u please explain or can u make a videos of it?

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Plot Excel graph from a cell value which changes every minute

    Quote Originally Posted by panzon View Post
    I want same ... but i don;t know where to place code... on sheet 1 or sheet 2.... can u please explain or can u make a videos of it?
    wow did you totally miss my post IMMEDIATELY above your post???

  13. #13
    Registered User
    Join Date
    12-10-2019
    Location
    india
    MS-Off Ver
    2007.2010
    Posts
    3

    Re: Plot Excel graph from a cell value which changes every minute

    i tried everything you said above... but didnt work for me...
    i have created excel sheet of stock market and one cell changes every single minute.... and i want a graph of all d changing values... please help

  14. #14
    Registered User
    Join Date
    12-10-2019
    Location
    india
    MS-Off Ver
    2007.2010
    Posts
    3

    Re: Plot Excel graph from a cell value which changes every minute

    Im sorry I didnt read your post above mine... I just read it... really sorry

  15. #15
    Registered User
    Join Date
    06-04-2021
    Location
    sol
    MS-Off Ver
    2019
    Posts
    2
    Quote Originally Posted by ajryan88 View Post
    Hi,

    I would suggest a macro.

    For example:
    1. Setup a (hidden if you wish) worksheet, call it Sheet2
    2. Place the following code into the worksheet module for your constantly-updating worksheet (call it Sheet1, with the updating value in cell A1):
    Please Login or Register  to view this content.
    NB: To bring up the worksheet module (if you are unfamiliar with VBA), right click on the worksheet tab when in spreadsheet view, and select "View Code".
    3. Setup a named range, call it "ChartRange", and use the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4. Setup your chart, and in the value range, enter the following range:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Hope this helps


    Thank you so much, this works really good , but it records values from only one cell i.e. A1 in this case , is it possible for it to record and graph the values from a range say "A1 TO C1 "?

  16. #16
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Plot Excel graph from a cell value which changes every minute

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] plot graph and place it in a cell possible?
    By Ross in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  2. [SOLVED] plot graph and place it in a cell possible?
    By Ross in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 05:05 PM
  3. plot graph and place it in a cell possible?
    By Ross in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. [SOLVED] plot graph and place it in a cell possible?
    By Ross in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. plot graph and place it in a cell possible?
    By Ross in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

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