table:
need the activity number (column a), of the largest length(column c), if column b is between 90 to 180 & column d ="insertion".![]()
Please Login or Register to view this content.
thank you
table:
need the activity number (column a), of the largest length(column c), if column b is between 90 to 180 & column d ="insertion".![]()
Please Login or Register to view this content.
thank you
Last edited by JBeaucaire; 11-10-2013 at 03:46 AM.
hi zappyzoo, maybe this array formula:
Formula:![]()
Please Login or Register to view this content.
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
Thanks, if you have clicked on the * and added our rep.
If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".
"Contentment is not the fulfillment of what you want, but the realization of what you already have."
Tips & Tutorials I Compiled | How to Get Quick & Good Answers
Probably an easier way than this, but enter as an array formula (Ctrl+shift+enter)
=SUM((D2:D7="Insertion")*(B2:B7>=90)*(B2:B7<=180)*(C2:C7=(MAX((D2:D7="Insertion")*(B2:B7>=90)*(B2:B7<=180)*(C2:C7))))*(A2:A7))
Frob first, tweak later
Ha, my version of the same idea:
=INDEX($A$2:$A$7, MATCH(MAX(($B$2:$B$7>=90)*($B$2:$B$7<=180)*($D$2:$D$7="insertion")*($C$2:$C$7)),
INDEX(($B$2:$B$7>=90)*($B$2:$B$7<=180)*($D$2:$D$7="insertion")*($C$2:$C$7), 0), 0))
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
http://screencast.com/t/ybYNcSAa
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
The LOOKUP could be an option! Assuming your data is in A1:E7 including headers.
Formula:![]()
Please Login or Register to view this content.
Or
Formula:
Please Login or Register to view this content.
Last edited by Crisp Packet; 11-10-2013 at 04:29 AM. Reason: Forgot the column D in the LOOKUP.
So many ways to crack an egg. If you change C3 to the highest value, all the solutions still work except the lookup
Edit:
If you then change D3 to 'Test', the Sumproduct formula fails
Last edited by Neil_; 11-10-2013 at 04:18 AM.
THe INDEX array I suggested is the only one I would trust. It will give a correct answer (the first one) from the matching criteria even if there are multiple lengths that match the max length.
Regards
sktneer
Treat people the way you want to be treated. Talk to people the way you want to be talked to.
Respect is earned NOT given.
I think only benishiryo's code works well with all the criteria if it is included with IFERROR cluase in it.
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks