I am fairly new to googlesheets and I apologize for the poor explanation beforehand. As the title suggests, what I'm trying to figure out using googlesheet formulas is:
Google Sheet Link : Click Here
Within the googlesheet above, Row 13 would have a problem since Row 13's Math's Page 8 overlaps with Row 8's Page 8.
So far, what I had in mind and tried was to split ranges of numbers into multiple columns so that I could compare each of those columns to duplicates' ranges of numbers, but I'm not sure what to do after from here. Another assumption is that I would need only to compare only the latest column to check for duplicate Course and overlapping range, but I'm not sure what to use here too.
I appreciate any tips and/or formulas to try out.
try:
={"Warning"; INDEX(SUBSTITUTE(REGEXREPLACE(IFNA(VLOOKUP(B3:B&"", TRIM(SPLIT(FLATTEN(
QUERY(QUERY({SEQUENCE(COLUMNS(SPLIT(TEXTJOIN(",", 1, D3:D), ","))),
QUERY(FLATTEN(IF(IFERROR(SPLIT(D3:D, ","))="",,B3:B)),
"where Col1 is not null")&"×",
IF(COUNTIFS(QUERY(FLATTEN(IF(IFERROR(SPLIT(D3:D, ","))="",,C3:C&SPLIT(D3:D, ","))),
"where Col1 is not null"),
QUERY(FLATTEN(IF(IFERROR(SPLIT(D3:D, ","))="",,C3:C&SPLIT(D3:D, ","))),
"where Col1 is not null"), SEQUENCE(COLUMNS(SPLIT(TEXTJOIN(",", 1, D3:D), ","))),
"<="&SEQUENCE(COLUMNS(SPLIT(TEXTJOIN(",", 1, D3:D), ","))))>1, "Error,",
QUERY(FLATTEN(IF(IFERROR(SPLIT(D3:D, ","))="",,SPLIT(D3:D, ","))),
"where Col1 is not null")&",")},
"select max(Col3) group by Col1 pivot Col2"),,9^9)), "×")), 2, 0)), ",$", ), ", ", ","))}