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:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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
You didn't answer the question.

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
 
Upvote 0
Actual criteria is between 40,50 and between 90,100 and taking in consideration results in this order 40,50,50,93,100,98 and using aggregate function
 
Upvote 0
Is it clear now
Yes it is, but it was after midnight my time when you posted this, so be patient as we are not all in your time zone. ;)

Code:
=IFERROR(INDEX($B2:$J2,IF(COLUMNS($M2:M2)<=COUNTIFS($B2:$J2,">=40",$B2:$J2,"<=50"),
     AGGREGATE(15,6,(COLUMN($B2:$J2)-COLUMN($B2)+1)/(ABS($B2:$J2-45)<=5),COLUMNS($M2:M2)),
     AGGREGATE(15,6,(COLUMN($B2:$J2)-COLUMN($B2)+1)/(ABS($B2:$J2-95)<=5),COLUMNS($M2:M2)-COUNTIFS($B2:$J2,">=40",$B2:$J2,"<=50")))),"")
 
Upvote 0
many thanks dear i know i tired you, this solution helps and works for me and do exactly what i need, wish i can modify in it easily and still works by adding more criterias :( i'll not ask any other question now ;)
 
Upvote 0
I failed to add third criteria to the formula which is between 60,70 I am so sad
 
Upvote 0

Forum statistics

Threads
1,215,532
Messages
6,125,363
Members
449,221
Latest member
chriscavsib

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