+ Reply to Thread
Results 1 to 10 of 10

Finding Sales based on Name and Date

Hybrid View

  1. #1
    Registered User
    Join Date
    10-19-2018
    Location
    Lisbon
    MS-Off Ver
    Office 2013
    Posts
    16

    Finding Sales based on Name and Date

    Hello,

    Trying to figure out how to have Excel check a table for two criteria: Name and Date

    This is an example table showing Employee Names, specific non-sequential dates and the number of sales for each date.


    ex.PNG

    So I'd like to be able to tell Excel to fetch sales number for "Employee A" on "Date X". Is this possible at all?

    I know how to use VLOOKUP but unfortunately I won't always be able to correlate the Column Index with specific dates since in my reporting they're not always sequential (as per the above example).

    Thanks in advance for your assistance.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,708

    Re: Finding Sales based on Name and Date

    You can use INDEX MATCH for this:

    =INDEX($B$2:$E$6,MATCH("John",$A$2:$A$6,0),MATCH("Dec 2",$AB$1:$AE$1,0))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Finding Sales based on Name and Date

    Or use a different layout with an SUMPRODUCT:

    =SUMPRODUCT($B$2:$H$6*($A$2:$A$6=$A11)*($B$1:$H$1=$B11))
    Attached Files Attached Files
    Click the * to say thanks.

  4. #4
    Registered User
    Join Date
    10-19-2018
    Location
    Lisbon
    MS-Off Ver
    Office 2013
    Posts
    16

    Re: Finding Sales based on Name and Date

    Thanks for your answer. I could not understand the coordinates but that's my fault because I cropped them from the picture I have sent.

    EXX.PNG

    So if I take this table into account, what formula would I need to use in order to determine Mark's sales on 16/12/2018?

    Also is it OK to use a Cell value to be looked up - i.e. B2 - (if value is exactly the same in the reference table) instead of the exact content in quotation marks - i.e. "John" or "16/12/2018"?

    Cheers!

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,708

    Re: Finding Sales based on Name and Date

    This:

    =INDEX($B$2:$E$4,MATCH("John",$A$2:$A$4,0),MATCH("16/12/2018",$AB$1:$AE$1,0))

    Yes, you can change exact data to cell references:

    =INDEX($B$2:$E$4,MATCH(F3,$A$2:$A$4,0),MATCH(F4,$AB$1:$AE$1,0))

    where F3 = John and F4 = 16/12/2018.

  6. #6
    Registered User
    Join Date
    10-19-2018
    Location
    Lisbon
    MS-Off Ver
    Office 2013
    Posts
    16

    Re: Finding Sales based on Name and Date

    Quote Originally Posted by AliGW View Post

    =INDEX($B$2:$E$4,MATCH("John",$A$2:$A$4,0),MATCH("16/12/2018",$AB$1:$AE$1,0))
    I'm not 100% clear on the logic of the formula yet. For the date, the Match content is $AB$1:$AE$1

    I do not have any data on columns AB or AE. What part of the table should the date part be using as the "lookup value"? I'm trying to build the formula manually and this is the only part I cannot fathom yet.

    Thanks again for you assistance!

  7. #7
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Finding Sales based on Name and Date

    If you use the layout posted in post #2, then you can use mine or Ali's formula and use the cell value instead of quotation marks

  8. #8
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Finding Sales based on Name and Date

    =INDEX($B$2:$E$4,MATCH(F3,$A$2:$A$4,0),MATCH(F4,$AB$1:$AE$1,0))

    where F3 = John and F4 = 16/12/2018.
    In Ali's example, $B$2:$E$4 contains the sales numbers, $A$2:$A$4 contains the names and $AB$1:$AE$1 the headers/dates. Is an example, and you can change it to reflect your data layout

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,708

    Re: Finding Sales based on Name and Date

    See below:

    =INDEX(results_data_range,MATCH("John"row_label_range,0),MATCH("16/12/2018",header_label_range,0))

  10. #10
    Registered User
    Join Date
    10-19-2018
    Location
    Lisbon
    MS-Off Ver
    Office 2013
    Posts
    16

    Re: Finding Sales based on Name and Date

    Hello,

    This worked like a charm, thank you so much!

+ 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. Lookup sales based on two criteria & date using on tab name in cell
    By Toyo613 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-16-2017, 08:38 PM
  2. [SOLVED] Lookup sales rep names based on program and date
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-29-2015, 01:29 PM
  3. Calculating sales trend based on formula for a date
    By PCLynx in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-17-2014, 11:49 PM
  4. Replies: 1
    Last Post: 05-31-2014, 01:38 AM
  5. Find Sales based on date
    By MRKachhia in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-31-2013, 08:08 AM
  6. Sumifs function based on Date range and sales value
    By Shihab in forum Excel General
    Replies: 7
    Last Post: 02-05-2012, 11:31 AM
  7. Replies: 1
    Last Post: 08-25-2010, 11:25 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