+ Reply to Thread
Results 1 to 3 of 3

Simple computation to record the difference between consecutive cells over a range

  1. #1
    Registered User
    Join Date
    01-03-2016
    Location
    5765
    MS-Off Ver
    2013
    Posts
    2

    Simple computation to record the difference between consecutive cells over a range

    Hi Guys!

    I have a functioning macro that copy pastes the static values of live data from the live data sheet (Sheet), onto a separate sheet (Sheet2) every second. The code is below. For your information, Range("B2:B2195") are stock codes while Range("H2:H2195") are stock quotes.


    Please Login or Register  to view this content.

    I would like to record the difference between the stock quotes. This is a simple computation that calculates the difference between a certain cell and the cell above it and records this value onto a separate sheet (Sheet3). This computation is done for every cell in the range H2:H2195.

    Please Login or Register  to view this content.
    and so on...

    As the copypaste_RECENT macro is executed every second, I would like this macro to be run simultaneously, that is, execute on Sheet3 as the data on Sheet2 is updated.

    Thanks in advance!

    Jayyunit
    Last edited by Jayyunit; 01-13-2016 at 03:02 AM. Reason: updated knowledge

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Simple computation to record the difference between consecutive cells over a range

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-03-2016
    Location
    5765
    MS-Off Ver
    2013
    Posts
    2

    Re: Simple computation to record the difference between consecutive cells over a range

    Sorry about that alansidman. I'll keep that in mind when posting from now on.

+ 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. simple macro to add new record, edit/ search and print record
    By xmoore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2015, 08:10 PM
  2. [SOLVED] simple computation of certain values that would give pass or a fail mark
    By cottonfam8 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-17-2014, 08:45 AM
  3. [SOLVED] Store consecutive cells range
    By fgq in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2013, 09:51 AM
  4. Replies: 3
    Last Post: 09-18-2012, 11:32 AM
  5. [SOLVED] Selecting a range of consecutive cells within a range
    By 8-bit in forum Excel General
    Replies: 2
    Last Post: 04-22-2012, 06:35 PM
  6. Greatest difference between a consecutive range of dates
    By Hugsie Bear in forum Excel General
    Replies: 3
    Last Post: 07-27-2006, 06:55 AM
  7. Greatest difference between a consecutive range of dates
    By Hugsie Bear in forum Excel General
    Replies: 1
    Last Post: 07-26-2006, 05:18 PM

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