+ Reply to Thread
Results 1 to 11 of 11

Update account history

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Update account history

    Hi,
    I need a VBA or function if it is possibe to update the account history.
    Once there is an new update, the current date and value will change
    from a formula to a value, then "=" formula will be added to the next
    row.

    Currently I am doing this manually to copy & pate value first before
    I change the new update. There are multiple worksheets doing the
    same. But sometimes I forgot to first copy and paste. Hopefuly VBA
    will automate that.

    I attched an example hope that will make it easy to explain.

    Thanks
    Attached Files Attached Files
    Last edited by Rocky2013; 02-10-2015 at 04:33 PM.

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Update account history

    Not clear on what you mean.
    If D4 changes to 02/15/15, then in account history, L10 and M10 will copy and paste VALUE to the same cells.
    Understand the if D4 changes part, but there's nothing in L10 and M10, so what does this mean. Are we copying to L10 and M10, if so what?

    Do you really want the formulas or just the values?
    Next row below, add formulas "= D4" to cell L11, "=F12" to cell M11 .
    Is what is now F12 going to be expanding down the sheet?

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Update account history

    Quote Originally Posted by skywriter View Post
    Not clear on what you mean.


    Understand the if D4 changes part, but there's nothing in L10 and M10, so what does this mean. Are we copying to L10 and M10, if so what?

    Do you really want the formulas or just the values?
    I review my file, I found something wrong what I wrote. I wrote the formula and steps of instruction.
    Orginally I try to use VBA to add = value in columns L and M. Then later I use if functions to preformate
    the cells in the next row. L10:O10 suppose to show the values. Because I did the formula wrong, the cells
    do not show any values.

    So before changing to a new day, 02/15/15 in D4; L10 and M10 should show as values instead of formula.
    If I do not change, L10 and M10 will be updated with the new date and values. I want to keep building the
    account history for every update.

    Is what is now F12 going to be expanding down the sheet?
    No; F12 will not keep expanding down. F12 will keep updating
    along with the account history update.


    I have to be carefull on my example. I am confuse too when I read it.

    I could try to use marco recording, I try not to click a button to update
    rather a real time update.
    Thanks of your interest to help.

    I am sorry for the confusion, I worte the instructions when there is no if funtions in columns L:O.
    Attached Files Attached Files
    Last edited by Rocky2013; 02-09-2015 at 09:53 AM.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Update account history

    See if this does what you want?
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Update account history

    Hi John,
    Thanks for the help. It does not do I want to do because
    I screw on the first Excel file. If I enter a new day, the last
    account history should change from a formula to a value.

    The second excel file has the update. Can you please use that
    to recode. I do not know how to figure you code to work with the
    file.

    Thanks

  6. #6
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Update account history

    REPEAT, SORRY!

    Hi John,
    Thanks for the help. It does not do I want to do because
    I screw on the first Excel file. If I enter a new day, the last
    account history should change from a formula to a value.

    The second excel file has the update. Can you please use that
    to recode. I do not know how to figure you code to work with the
    file.

    Thanks
    Last edited by Rocky2013; 02-09-2015 at 09:11 PM.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Update account history

    OK. Then try this one?
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Update account history

    Hi,
    This is what I find.
    On the account history, M10 is greate than M9, profit should be a "Gain" in the last transaction.

    I notice that update stock data needs to update first, then enter the new date to add new row.
    My orginal thought is enter a new day, but that is OK.

    There is dash border line around K9:O9, can that disappears after running the code?
    I hit an escape key manually to close the dash border.

    Thanks

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Update account history

    Try it now. Let me know what happens.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Update account history

    Hi,
    When I change the share number, F12 does not change.
    So I add a formula SUM(F10:F11) to F12.

    It is working now.

    Thanks

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Update account history

    Glad to here you got a working solution.

+ 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. I need VBA code to update log worksheet and maintain a history of all orders.
    By adelkam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2013, 10:26 PM
  2. Replies: 5
    Last Post: 12-11-2012, 01:22 PM
  3. Replies: 1
    Last Post: 09-07-2012, 12:00 PM
  4. Create version history to auto update
    By cazzy83 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2012, 09:45 AM
  5. Replies: 9
    Last Post: 03-12-2012, 05:30 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