Extracting data using multiple criteria

jdhfch

Board Regular
Joined
Jan 25, 2018
Messages
69
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am trying to extract all data from a list based on 2 criteria. Eg, The first is an account number (in B1) and the second is a product code (in B8) and I am wanting to extract all order numbers for that account only, in the source data the account number is in column D, the product is in Column C and the data I want to extract is in column F. It is possible that there will be multiple orders..

Please can anyone help?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi Jdhfch,

If you can update your profile with your Excel version it would help. I'm using Excel 2016 but if you have 365 there's a simpler solution.

JDHfch.xlsx
ABCDEFGH
1Account No.Product CodeAccount No.Order No.Extract
2AC123XX222AC222ON102ON106
3XX828AC123ON103ON104
4XX090AC222ON104ON111
5XX828AC222ON105ON112
6XX090AC123ON106 
7Product CodeXX828AC222ON107 
8XX090XX090AC123ON104 
9XX828AC123ON109 
10XX090AC222ON110 
11XX090AC123ON111 
12XX090AC123ON112 
13 
Sheet1
Cell Formulas
RangeFormula
H2:H13H2=IFERROR(INDEX($F$2:$F$99999,AGGREGATE(15,6,ROW($C$2:$C$99999)-ROW($C$1)/(($D$2:$D$99999=$A$2)*($C$2:$C$99999=$A$8)),ROW()-ROW($H$1))),"")
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top