Returning the next & previous result from a table
Hi, I have a specified date (say 01/06/26 in cell A1), and a specified account (say account "7032" cell B1, I'd have a list of up to 50 accounts say from B1 - B50 but I'd drag the formula down to produce a result for each separately). I have automated a table in a tab called "Business Days", the table shows all the days in 2026 in Row1, and all the accounts we track in Column A. The contents of the table C1:NC500 contain either "Y" (if it is a business day) or "N" (if it isn't). I need two formulae - one that would lookup the date from A1, and the account from B1, check the table and return the next date that contains a "Y", and one that would return the previous date that contained a "Y". So I'm starting with a list of accounts that were on holiday for 01/06/26 and returning what are the dates for the next, and previous business days for each of those accounts separately (the different accounts track different holidays, hence the table). I'm thinking some combination of lookup, index, match, & small, but it's beyond my skills.
[link] [comments]
Want to read more?
Check out the full article on the original site