Closed Thread
Results 1 to 2 of 2

I would Like to have excel scan a column, backwards in time for the most recent match of a

  1. #1
    Registered User
    Join Date
    06-17-2015
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    I would Like to have excel scan a column, backwards in time for the most recent match of a

    Screenshot (22).png


    First time I have been in a forum and not very experienced with excel, so please bare with me.

    I am trying to create a stock trading journal with calculations in it.


    See picture of my spreadsheet, I removed many of the non relevant columns.


    Currently I am using =IF(D6="Stock",H6/J6,G6*J6/E6) (in the stocks current cost basis columns (K) to give me the cost basis if its a purchase designated by the word stock, otherwise give me the per share cost or profit earned by the trade.

    There can be multiple columns for each trade/symbol, being more then one lot of stocks included in the trade that are currently open.

    I'd like to have the spreadsheet do is,
    when I enter stock symbol it looks back to match up the last trade for each lot in the trade (this might be more then one row or previous trade as the lots may not always be part of the same trade), (maybe by matching the stock symbol, matching purchase date and lot number) and then keep a running total, adjusting the last matching lot number's cost basis by the net premium per share (Column G) and putting that/those total(s) in the most recent row (Stocks Current Cost Basis Lot) or the column next to it if another column is needed to do the calculation... row by row trade by trade.

    Can this be done? How?

    Please ask me any question if I was not exact or clear.

    Thanks,

    Rick


    Screenshot (22).png

  2. #2
    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,938

    Re: I would Like to have excel scan a column, backwards in time for the most recent match

    Rick, welcome to the forum

    This seems to be a duplicate of your other thread?
    http://www.excelforum.com/excel-gene...culations.html

    I am closing this so you can continue on the other 1. If these are not the same, PM me to discuss, please.
    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

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] =MATCH backwards
    By Dave Breda in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-14-2013, 10:08 AM
  2. [SOLVED] Finding the most recent case in a column for time difference calculation
    By ahickey in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-25-2013, 12:28 AM
  3. Match Backwards
    By Gary's Student in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-21-2005, 01:06 PM
  4. Replies: 1
    Last Post: 03-04-2005, 12:06 PM
  5. Can Excel Convert time backwards??
    By RudeRam in forum Excel General
    Replies: 0
    Last Post: 01-30-2005, 10:16 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