+ Reply to Thread
Results 1 to 6 of 6

Look-up and return data in a certain cell according to multiple criteria

  1. #1
    Registered User
    Join Date
    05-16-2021
    Location
    Saint-Petersburg
    MS-Off Ver
    MS Office 365
    Posts
    13

    Look-up and return data in a certain cell according to multiple criteria

    Hello, everyone!

    I am dealing with a task in financial field and having some problems with choosing right formula.

    1) The first excel sheet I have represents calendar-time dates in the first column; company tickers (names) in the first row and special event dates in the second row.
    2) The second excel sheet contains data on daily returns for range of companies tickers (names). Let's say it is a kind of map, where you can find any data you want.

    The task is to return a value (returns) from the second excel sheet to the first excel sheet with a rule that value should be returned on that day, when special event happened and it should return the value for the next 30 days from the day of an event.

    For simplicity I am attaching a sample file and how the final results should look.

    Thank you all very much beforehand!
    Attached Files Attached Files
    Last edited by Orif; 05-16-2021 at 01:07 PM.

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Look-up and return data in a certain cell according to multiple criteria

    Hi
    What and where should be your expected results?

  3. #3
    Registered User
    Join Date
    05-16-2021
    Location
    Saint-Petersburg
    MS-Off Ver
    MS Office 365
    Posts
    13

    Re: Look-up and return data in a certain cell according to multiple criteria

    Hi, belinda200
    My expected results are values from the second sheet:
    1) that correspond to the company ticker and day of an event from the first sheet
    2) returns values for the following 30 days from the date of an event
    I tried to represent it in the sample file (Sheet1), in the example of MGA.N, where event happens in 06.01.2010 and values are returned from the Sheet2 starting from 06.01.2010 and for the following 30 days.
    I hope it gives some more explanation for my problem.
    Thanks!

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Look-up and return data in a certain cell according to multiple criteria

    Hi
    Try this in B3 and acrosS:

    =IF(AND($A3-B$2<30,$A3-B$2>=0),AGGREGATE(14,6,(Sheet2!$B$2:$D$4502)/(Sheet2!$B$1:$D$1=Sheet1!B$1)/(Sheet2!$A$2:$A$4502=Sheet1!$A3),1),"")
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-16-2021
    Location
    Saint-Petersburg
    MS-Off Ver
    MS Office 365
    Posts
    13

    Re: Look-up and return data in a certain cell according to multiple criteria

    Quote Originally Posted by belinda200 View Post
    Hi
    Try this in B3 and acrosS:

    =IF(AND($A3-B$2<30,$A3-B$2>=0),AGGREGATE(14,6,(Sheet2!$B$2:$D$4502)/(Sheet2!$B$1:$D$1=Sheet1!B$1)/(Sheet2!$A$2:$A$4502=Sheet1!$A3),1),"")
    It definitely solves my problem! Thank you very much, really appreciate it. I've been mixing my had with some Index+Match stuff. Didn't know about Aggregate function!

  6. #6
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Look-up and return data in a certain cell according to multiple criteria

    You can definitely also use the INDEX/MATCH to get same results.

    use this in B3 and across:
    =IF(AND($A3-B$2<30,$A3-B$2>=0),INDEX(Sheet2!$B$2:$D$4502,MATCH(Sheet1!$A3,Sheet2!$A$2:$A$4502,0),MATCH(Sheet1!B$1,Sheet2!$B$1:$D$1,0)),"")

+ 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. Replies: 3
    Last Post: 08-17-2019, 05:53 AM
  2. Replies: 5
    Last Post: 05-27-2019, 03:46 PM
  3. Match & return data across multiple sheets, multiple criteria
    By mrsproctor in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-18-2015, 06:01 PM
  4. [SOLVED] How to return multiple values to a single cell based on multiple criteria
    By lwallace in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2014, 06:32 AM
  5. [SOLVED] Multiple criteria data return
    By xrajncajnx in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-16-2014, 08:48 AM
  6. Replies: 2
    Last Post: 05-12-2014, 08:21 AM
  7. Replies: 0
    Last Post: 10-16-2013, 12:42 PM

Tags for this Thread

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