Hi all,
I'm trying to search through a column of A's, B's and null return values for the next instance of A or B, can anyone help?
The formula I'm working with is currently working with dates to find the date of the next monday in a week A or B (school 2 week timetable), when I get to school holidays it is neither week A or B, so the null value is returned. At the moment the formula is set to find date 1 week after. The problem I have is that it's not always 1 week later I'm looking for, sometimes it's two weeks, is there a formula that can do this for me?
At the moment I have:
=IF(OR(INDEX(C:C,MATCH(TODAY()+(7-WEEKDAY(TODAY(),2)+1),E:E))="A",INDEX(C:C,MATCH(TODAY()+(7-WEEKDAY(TODAY(),2)+1),E:E))="B"),TODAY()+(7-WEEKDAY(TODAY(),2)+1),TODAY()+(7-WEEKDAY(TODAY(),2)+8))
Basically, if next monday's date is in A or B, return next monday's date, if not return the monday after.
It's that final part in bold that I'm looking to change to "search for the next monday with A or B".
I'm trying to search through a column of A's, B's and null return values for the next instance of A or B, can anyone help?
The formula I'm working with is currently working with dates to find the date of the next monday in a week A or B (school 2 week timetable), when I get to school holidays it is neither week A or B, so the null value is returned. At the moment the formula is set to find date 1 week after. The problem I have is that it's not always 1 week later I'm looking for, sometimes it's two weeks, is there a formula that can do this for me?
At the moment I have:
=IF(OR(INDEX(C:C,MATCH(TODAY()+(7-WEEKDAY(TODAY(),2)+1),E:E))="A",INDEX(C:C,MATCH(TODAY()+(7-WEEKDAY(TODAY(),2)+1),E:E))="B"),TODAY()+(7-WEEKDAY(TODAY(),2)+1),TODAY()+(7-WEEKDAY(TODAY(),2)+8))
Basically, if next monday's date is in A or B, return next monday's date, if not return the monday after.
It's that final part in bold that I'm looking to change to "search for the next monday with A or B".
Last edited: