+ Reply to Thread
Results 1 to 7 of 7

copying new data on a w'sheet without deleting historical data, and recalculating

  1. #1
    Forum Contributor
    Join Date
    05-13-2009
    Location
    London, England
    MS-Off Ver
    Excel XP
    Posts
    174

    copying new data on a w'sheet without deleting historical data, and recalculating

    Hi guys, im just stuck on this, its probably not that hard, any help would be much appreciated.

    There are 3 sheets - raw,A, and B
    In 'raw' i will have unfiltered data from which i need to transfer 2 cells onto Sheet A and B. I need the Date and 'Total Equity' (which will be called Price in Sheet A/B).....the code should be something like -' If Column A has accoun# 323 and column G = USD, then copy the corresponding cells in column C(date) and column E (total eq.), send iit to sheet 'A', if acct# is '540' and colimn G =USD then send the corresponding Column C,E amounts to sheet 'B'.



    Take a look at the Sheet ‘A’, I need new data to be entered into the sheet(in Row 2 everyday, without deleting any of the previous historical data). Then once this is imported into the sheet I want the following calculations to be run on the new figures

    - Index (which is C2/$C$3777*100)

    – Daily % change (which is LN(C2/C3))…should be done for whole column

    - Volatility – (STDEV(E3:E3777)*SQRT(252))

    - Cummulative Return - E2+G3

    - Drawdown - ‘ –(MAX($G5:G$3776)-G5)


    I hope that wasnt too confusing, if unclear please ask

    thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    05-13-2009
    Location
    London, England
    MS-Off Ver
    Excel XP
    Posts
    174

    Re: copying new data on a w'sheet without deleting historical data, and recalculating

    I suppose this is tougher than i thought.
    just bumping it up he queue in hope that someone figuresit out, thanks

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: copying new data on a w'sheet without deleting historical data, and recalculating

    I don't think you have explained clearly enough
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: copying new data on a w'sheet without deleting historical data, and recalculating

    Not entirely sure I follow the final formulae logic but the below should mimic your current setup

    Please Login or Register  to view this content.
    (edit: I think in reality this will need tweaking but like Roy has already said it may be better to outline the formula requirements of C:F)
    Last edited by DonkeyOte; 10-18-2009 at 04:48 AM. Reason: not releasing objects!

  5. #5
    Forum Contributor
    Join Date
    05-13-2009
    Location
    London, England
    MS-Off Ver
    Excel XP
    Posts
    174

    Re: copying new data on a w'sheet without deleting historical data, and recalculating

    Thanks for responding guys

    DonkeyOte, I tried your macro but it didnt work
    but I realize now that I wasnt clear at all as pointed out by Roy

    From'Raw' i just need to copy 2 pieces of info onto the sheets A & B
    1. the Date
    2. the TotalEquity (which will be referred to as 'Price' in Sheets A & B)

    This will be done everyday, so basically 2 cells are being copied to each Sheet from column C(Date) and Column E(Tot.Eq).
    Now i only want to copy this info from those rows that have Column G value = USD
    If its account 323 send to sheet 'A'
    If account 540 send to sheet 'B'

    (in this version i have only 2 diffrnt accounts but in reality there's about 5 to 7. So i think using the 'Case' method like DonkeyOte did is the best bet)

    I hope I was a little more clear there about what needs to be copied


    The Date should be copied on to cell A2, and the Tot eq/Price onto cell B2 ---everytime.
    once this is done everything in the page has to be recalculated- there are 4 formulae in columns C:F in 'sheets A and B'.

    well thats about it i think...I'll try to tweak the macro DonkeyOte provided and see if I can make it work

    Thanks again for the help guys

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: copying new data on a w'sheet without deleting historical data, and recalculating

    Perhaps then

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    05-13-2009
    Location
    London, England
    MS-Off Ver
    Excel XP
    Posts
    174

    Re: copying new data on a w'sheet without deleting historical data, and recalculating

    I see whats happening, the macro is copying the cells at the next empty row, instead of doing it on the 2nd row and pushing down the existing data. basically i need to insert a row in the 2nd row and then have the new data copied there.........then getting all the formula to work

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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