Aug 21 2024 01:23 PM
There are 4 possible jobs, the following cells will contain either a "Yes or a "No" that they were completed:
Job cells are:
job 1 = X105, job 2 = AW105, job 3 = X133, job 4 = AW133
The first one of these job cells, in numerical order, to have a "yes", needs to have the corresponding TD cell populate in cell AK178.
TD Cells are:
TD 1 = Q108, TD 2 = AP108, TD 3 = Q136, TD 4 = AP136
My problem is that there can be more than 1 job completed. Cell AK178 is for the 1st job that has a "yes".
Cell AK179 needs to be populated with the next job that has a "yes" in numerical order.
So, if Job 1 is a "No", Job 2 is a "Yes", Job 3 is a "Yes", and Job 4 is a "No".......
then AK178 should equal AP108
and AK179 should equal Q136
or.............
If Job 1 is a "Yes", Job 2 is a "No", Job 3 is a "Yes", and Job 4 is a "No".......
then AK178 should equal Q108
and AK179 should equal Q136
I can write the formula for one but not if there are 2 completed jobs. Help please!!
Aug 21 2024 01:28 PM - edited Aug 21 2024 02:11 PM
IF you have 365 then you can use FILTER to make it easy but do you want a 3rd in AK180 and 4th in AK181? or only a max of 2? Here is for a max of 2:
=TAKE(FILTER( VSTACK(Q108, AP108, Q136, AP136), VSTACK(X105, AW105,X133,AW133)="yes", ""),2)
If you don't have Excel365 you can try this:
=IFERROR(CHOOSE(MIN( 1+SUM(--(MMULT( --MID( CONCAT( --(X105="yes"),--(AW105="yes"),--(X133="yes"),--(AW133="yes")),{1,2,3,4},1), {1,1,1; 1,1,1; 0,1,1; 0,0,1} )<2))), Q108, AP108, Q136, AP136),"")
Aug 22 2024 06:30 AM
Aug 22 2024 06:43 AM
Aug 22 2024 07:08 AM
Aug 22 2024 09:16 AM