IF and Index Match

jamesmev

Board Regular
Joined
Apr 9, 2015
Messages
153
I am trying to avoid using vlookup... That might be the most over used statement in Excel world.

I have a sheet where I need the result if two criteria are met.
For simplicity I'll try to explain below

A B C
NAME Date Total



So if you have on sheet 1 "Name" and it falls within "Date" it provides "total"

Any help would be appreciated... This might be one of those .... DUH formula's but - my brain is broken.
 

Some videos you may like

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

duggie33

Board Regular
Joined
Nov 19, 2018
Messages
77
Office Version
  1. 365
Platform
  1. Windows
Are you looking to return a single value, sum multiple values that meet the name and date requirements, or something else?

I personally think vlookup is useful for certain situations...it's simple.
 

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,630
Office Version
  1. 365
Platform
  1. Windows
Maybe something like one of the below formulas (it would help to post an example with the expected resulted).

The INDEX AGGREGATE formula in C8 will work in Excel 2010 or later.
If you have an earlier ver. then maybe something like the formula in C9 which must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABC
1NAMEDateTotal
2Mary Smith2/5/201945
3Becky Jones3/5/201956
4Sam Spade3/1/201968
5
6
7Lookup
8Becky Jones3/5/201956
956
Sheet
 

jamesmev

Board Regular
Joined
Apr 9, 2015
Messages
153
Maybe something like one of the below formulas (it would help to post an example with the expected resulted).

The INDEX AGGREGATE formula in C8 will work in Excel 2010 or later.
If you have an earlier ver. then maybe something like the formula in C9 which must be entered with CTRL-SHIFT-ENTER.

ABC
1NAMEDateTotal
2Mary Smith2/5/201945
3Becky Jones3/5/201956
4Sam Spade3/1/201968
5
6
7Lookup
8Becky Jones3/5/201956
9 56

<colgroup><col style="width:30px; "><col style="width:90px;"><col style="width:86px;"><col style="width:76px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
C8=INDEX($C$2:$C$4,AGGREGATE(15,6,(ROW($A$2:$A$4)-ROW($A$2)+1)/(($A$2:$A$4=$A$8)*($B$2:$B$4=$B$8)),1))
C9{=INDEX($C$2:$C$4,MATCH(1,($A$2:$A$4=A8)*($B$2:$B$4=$B$8),0))}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

The Aggregate works perfectly. I am running into an issue that the data is a Pivot.. Is there a way to combat that? I am getting a NUM error?
Any Ideas?
 

jamesmev

Board Regular
Joined
Apr 9, 2015
Messages
153

ADVERTISEMENT

It appears to be the reference to a secondary sheet. . . The formula lives on Sheet 1 - - - the data lives on Sheet 2. When I reference the 2nd sheet is where I'm getting the issue. The Pivot isn't creating the problem.
 

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,630
Office Version
  1. 365
Platform
  1. Windows
See if this example helps using 2 sheets.

Excel Workbook
ABC
1Lookup
2Becky Jones3/5/201956
Sheet1
Excel Workbook
ABC
1NAMEDateTotal
2Mary Smith2/5/201945
3Becky Jones3/5/201956
4Sam Spade3/1/201968
Sheet2
 

jamesmev

Board Regular
Joined
Apr 9, 2015
Messages
153
Thank you. I appreciate it. I believe this has been resolved. Great help!
 

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,630
Office Version
  1. 365
Platform
  1. Windows
You're welcome. Thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,426
Messages
5,528,690
Members
409,830
Latest member
KT50

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top