Value from list depending on conditions for Google sheets

yomarcos

New Member
Joined
Aug 13, 2021
Messages
39
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I have been working on this for 2 days straight and I can't figure it out.

I have a list of employees. Depending on the dates and hours needed for every project I get True or False if there is a conflict. I want a formula that provides me with an alternative when there is a conflict. So in H2 the next option should be James. Thomas is in conflict but Daniel (next on the list) is also in conflict. Please help!!

1628870282829.png
 

Attachments

  • 1628869523585.png
    1628869523585.png
    10.6 KB · Views: 8
  • 1628870102701.png
    1628870102701.png
    43.5 KB · Views: 8
Last edited by a moderator:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Welcome to Mr Excel forum

See if this works for you
H2 copied down
=IF(--G2=0,"",INDEX(INDEX(A$13:B$18,0,MATCH(B2,A$12:B$12,0)),AGGREGATE(15,6,(ROW(INDEX(A$13:B$18,0,MATCH(B2,A$12:B$12,0)))-ROW(A$13)+1)/ISNA(MATCH(INDEX(A$13:B$18,0,MATCH(B2,A$12:B$12,0)),F$2:F$10,0)),COUNTIFS(B$2:B2,B2,G$2:G2,G2))))

Hope this helps

M.
 
Upvote 0
Welcome to Mr Excel forum

See if this works for you
H2 copied down
=IF(--G2=0,"",INDEX(INDEX(A$13:B$18,0,MATCH(B2,A$12:B$12,0)),AGGREGATE(15,6,(ROW(INDEX(A$13:B$18,0,MATCH(B2,A$12:B$12,0)))-ROW(A$13)+1)/ISNA(MATCH(INDEX(A$13:B$18,0,MATCH(B2,A$12:B$12,0)),F$2:F$10,0)),COUNTIFS(B$2:B2,B2,G$2:G2,G2))))

Hope this helps

M.
Hi Marcelo,

I think that would work perfectly. However, my boss wants me to use Google sheets instead of Excel (not happy about it) and the aggregate function is not recognised.

My apologies, I should have mentioned that before
 
Upvote 0
think that would work perfectly. However, my boss wants me to use Google sheets instead of Excel (not happy about it) and the aggregate function is not recognised.

I used AGGREGATE as a kind of SMALLIFS, i.e, SMALL with conditions

I don't have any experience with Google sheets, but maybe you can adapt it using something like
=ArrayFormula (INDEX(INDEX(...),SMALL(IF(conditions,ROW(INDEX(...))-ROW(A$13)+1),COUNTIFS(...))))

M.
 
Last edited:
Upvote 0
I used AGGREGATE as a kind of SMALLIFS, i.e, SMALL with conditions

I don't have any experience with Google sheets, but maybe you can adapt it using something like
=ArrayFormula (INDEX(INDEX(...),SMALL(IF(conditions,ROW(INDEX(...))-ROW(A$13)+1),COUNTIFS(...))))

M.
I tried, but I am not sure what you mean with conditions in the SMALL(IF(
 
Upvote 0
This worked for me in a Google sheet
H2 copied down
=ArrayFormula(IF(--G2=0;"";INDEX(INDEX(A$13:B$18;0;MATCH(B2;A$12:B$12;0));SMALL(IF(ISNA(MATCH(INDEX(A$13:B$18;0;MATCH(B2;A$12:B$12;0));F$2:F$10;0));ROW(INDEX(A$13:B$18;0;MATCH(B2;A$12:B$12;0)))-ROW(A$13)+1);COUNTIFS(B$2:B2;B2;G$2:G2;G2)))))

M.
 
Upvote 0
A better picture - you can see the entire formula
 

Attachments

  • yomarcosV2.JPG
    yomarcosV2.JPG
    113.8 KB · Views: 6
Upvote 0
My version uses semicolons as argument separator in formulas - i think you should substitute them by commas

M.
 
Upvote 0

Forum statistics

Threads
1,223,993
Messages
6,175,836
Members
452,674
Latest member
psion2600

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