Results 1 to 2 of 2

Thread: Formula to extract value from 2 rows below.

  1. #1
    Neophyte theocharis's Avatar
    Join Date
    Sep 2020
    Excel Version

    Formula to extract value from 2 rows below.

    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello to everone in the forum.

    I would like to kindly ask for the expertise and help of someone regarding an important project that I work on in my company. The problem that I am facing is the following: Imagine that I have a dataset similar to sheet1 to the workbook that I attached. I am always receiving bond transactions for the same company always twice indicating one time "Sell" and one time "Buy". The dataset is large with each week around 300 observations coming out. What I need to do is to build a formula so that ONLY ONE of the two cases for each deal either "Sell" or buy but NOT both of them are copied in sheet1 (imagine that it is similar to what I have attached). This means that the formula needs to include only one row of the two that refer to the same company, omit the next one, and move for the next company where it does the same etc. In sheet 2 I also need to extract not the name but the category of the company that issues the bond, which I specify in columns K & L. The formula that I have written in Sheet 2 which apparently doesn't work is the following:


    Effectively my intuition is the following: If the cell in column D is "Sell" then go to the table and find me the category, otherwise if the cell in column D is buy, then ommit that row, go to the next one and again take the value from the table specified in columns K and L.

    I really struggle to find out what I am doing wrong. Can someone please help me with that one? It would be much appreciated.

    Thanks in advance,

    Attached Files Attached Files

  2. #2
    Administrator AliGW's Avatar
    Join Date
    Nov 2015
    Ipswich, Suffolk, England
    Excel Version
    MS365 Sub (Insider) Win11
    This query has been cross-posted on at least one other forum. Before we help, please provide a link to that cross-post, as per the forum rules.
    Enthusiastic self-taught user of MS Excel!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts