0

I have 2 worksheet that work together. Worksheet "Application" has a DATE column, a CODE column (a single digit number), and a VALUE column with a dollar value.

Worksheet "Scheduled" also has a DATE column.

I need a formula on the Scheduled worksheet that will look at the Application worksheet, find the row that has both a given date and a given code, then return the 1st row number meeting both of those criteria. I can get the row number for one criteria or the other but not both. For example:

=MATCH(D4,Application!C$1:C$279)

Will return the row number with the date that is in D4. But how do I add a second criteria to that?

3
  • One approach would be to define a "helper column" that concatenates the Date and Code values, and then search that. (You can hide it if you don't like to see it.) Commented Aug 25, 2014 at 23:08
  • Have you looked into excels developer tab it has to be enabled through the option's tab under file menu you can reference from any sheet in the same document. you will need to know the basics of VBA look for online tutorials for some helpful info.
    – CS_STEM
    Commented Aug 25, 2014 at 23:14
  • Good idea. I'll try that.
    – user348514
    Commented Aug 27, 2014 at 14:18

2 Answers 2

2

I would use the Power Query Add-In for this. It has a Merge command that can handle this requirement without writing a single formula or any code.

http://office.microsoft.com/en-au/excel-help/merge-queries-HA104149757.aspx?CTT=5&origin=HA103993872

I would start a Query based on your Application table. I would add an Index column (row number).

Then I would start another Query based on your Scheduled table. I would Merge that with the Application query, matching on Date and Code. Then I would use the Group By command to collapse by Date and Code and get the Min Index.

2
  • Interesting. I've never yeard of that before. I'll look into it.
    – user348514
    Commented Aug 27, 2014 at 14:18
  • FYI Power Query is now baked in to Excel 2016 (and Power BI) - it has become the default Data ribbon toolkit.
    – Mike Honey
    Commented Aug 20, 2018 at 8:14
1

You can combine criteria with an array formula, too. If your second criteria is in E4 and the corresponding column is Application!D$1:D$279, then the following formula would work. It must be entered with Ctrl+Shift+Enter as it is an array formula.

{=MATCH(D4&"|"&E4,Application!C$1:C$279&"|"&Application!D$1:D$279)}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .