Extract Data From Table vertically according to tow criterias

Excel777

Well-known Member
Joined
Jul 3, 2009
Messages
912
Office Version
  1. 2019
hello,

i want to get data from first table vertically depending on two criterias value between 90,100
wish find non array formula
results coulmn M
taking in consinderation if i have two values on the same date the criteria applied in it it extract them.
thanks in advance for help
Sheet1

*ABCDEFGHIJKLM
1DateGroup1Group2Group3Group4Group5Group6Group7Group8Group9*DateExtracted Values
21/1/2016153140287158687748*1/1/2016*
31/2/20161667184764662824*1/2/2016*
41/3/201667474445258144472*1/3/2016*
51/4/2016599521031920810*1/4/201695
61/5/201690502563828201689*1/5/201690
71/6/2016704605146800400629*1/6/2016*
81/7/2016147821181248591733*1/7/2016*
91/8/201659518298020120170*1/8/201698
101/9/201670234625485365358*1/9/2016*
111/10/201619186835638268899*1/10/2016*
121/11/20163032957627595738*1/11/201695
131/12/20161533794288911921*1/12/201694
141/13/2016684336991464547*1/13/201691
151/14/201615364171231594964*1/14/201694
161/15/201679892742525409532*1/15/201695
171/16/201661216258173226697*1/16/2016*
181/17/2016557782202155663371*1/17/2016*
191/18/2016371683566276327*1/18/2016*
201/19/2016343398756948783*1/19/201698
211/20/201636128358372964616*1/20/201696
221/21/20164392825249133049*1/21/201691

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
You were wanting to do this without array formulas, though I'm not sure why. The following much shorter formula is really an array formula but does not require the Ctrl+Shift+Enter confirmation, though it does require Excel 2010 or later:

Excel Workbook
ABCDEFGHIJKLMNOPQRS
1DateGroup1Group2Group3Group4Group5Group6Group7Group8Group9DateValues
21/1/201640935010098147019501/1/20164050509398100
Check values (3)
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Million of thanks for your apnswer your short last formula will be very helpful for me coz I'll add more criteria till 9 criteria is the last formula accept that
 
Upvote 0
Million of thanks for your apnswer your short last formula will be very helpful for me coz I'll add more criteria till 9 criteria is the last formula accept that
Cheers.
You can also write it a bit shorter like this, where the 45 and 95 are the exact mid-point of each range of interest and the 5s are the distance from that mid-point to either end-point of the range.
Note that there is no particular advantage in doing this, just choose the one you understand the best & can modify yourself the easiest.

Excel Workbook
ABCDEFGHIJKLMNOPQRS
1DateGroup1Group2Group3Group4Group5Group6Group7Group8Group9DateValues
21/1/201640935010098147019501/1/20164050509398100
Check values (4)
 
Upvote 0
Actually it's 100 apart
First criteria between 100,110
Second one between 200,210
And so on till 1000,1010
Can you program this for me.
 
Upvote 0
Actually it's 100 apart
First criteria between 100,110
Second one between 200,210
And so on till 1000,1010
Can you program this for me.
For a regular pattern like that, it is much simpler:

=IFERROR(AGGREGATE(15,6,$B2:$J2/(MOD($B2:$J2,100)<=10),COLUMNS($M2:M2)),"")


or depending on how big/small the actual values can be, you might need

=IFERROR(AGGREGATE(15,6,$B2:$J2/((MOD($B2:$J2,100)<=10)*($B2:$J2>10)*($B2:$J2<1100)),COLUMNS($M2:M2)),"")
 
Upvote 0
Dear Mr Peter Million Of Thanks For Your Smart Answer You Are Really MR EXCEL ,
Your Answers Helped Me Alot
God Bless,
 
Last edited:
Upvote 0
hello dear i need a help if possible
need to ignore the arrange small to large or large to small in the criteria range in other words get the values according to their occurrence in the criteria range

in our example the results will be start at m2



40 , 50 , 50 , 93 , 100 , 98

note that 100 occur before 98 in it's criteria range so it should be placed first

the quoted formula is very helpful so need the modification in it coz it allows me to add more criterias easilys

You were wanting to do this without array formulas, though I'm not sure why. The following much shorter formula is really an array formula but does not require the Ctrl+Shift+Enter confirmation, though it does require Excel 2010 or later:

Check values (3)

ABCDEFGHIJKLMNOPQRS
1DateGroup1Group2Group3Group4Group5Group6Group7Group8Group9DateValues
21/1/201640935010098147019501/1/20164050509398100

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
M2=IFERROR(AGGREGATE(15,6,$B2:$J2/(($B2:$J2>=40)*($B2:$J2<=50)+($B2:$J2>=90)*($B2:$J2<=100)),COLUMNS($M2:M2)),"")

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
40 , 50 , 50 , 93 , 100, 98
What is your actual criteria?
- Is it 40-50 and 90-100 like the above example appears, and as your earlier posts requested?
- Or is it as below?

Actually it's 100 apart
First criteria between 100,110
Second one between 200,210
And so on till 1000,1010

Please decide what your final requirement is (which numbers and what order) and explain that clearly so we don't have keep going back and changing the formula each time you decide on something different. ;)
 
Upvote 0
Sorry for that,

I need the final results in that order 40,50,50,93,100,98 by using aggregate function.... this is the final request
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,568
Messages
6,125,599
Members
449,238
Latest member
wcbyers

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