This approach is exactly backward. You don't need a nested XLOOKUP to solve this. You need a lookup table and a simple WEEKDAY check, and the reason you're stuck is that you're treating a logic problem like a formula puzzle.
Let's start with what you actually have. You have two shipping rules: most locations ship on Friday, but two locations ship the day before the event. That's not a complex variable set. That's two conditions. The right tool for this is a small reference table that maps each location to its required shipping offset, for example, "days before event" and "required ship day of week." Then you use XLOOKUP to pull the offset for the location, subtract that from the event date, and use WEEKDAY to confirm the resulting date falls on the correct day. If it doesn't, you back up to the previous occurrence of that day.
Here's the practical truth: you were on the right track with XLOOKUP, but you were trying to do everything in one formula. That creates friction, not clarity. Break it into steps. Column A: event date. Column B: location. Column C: XLOOKUP returns the offset (e.g., 1 for day-before locations, 5 for Friday shippers). Column D: =A2 - C2 gives the raw ship date. Column E: =WEEKDAY(D2, 2) returns the day of week (Monday=1, Sunday=7). Column F: a simple IF statement adjusts the date to the correct day. For Friday shippers, if WEEKDAY isn't 5, subtract the difference. For day-before shippers, if WEEKDAY isn't the event's weekday minus one, adjust.
This isn't about mastering a function you've never used. It's about admitting that spreadsheets are not magic, they're logic. And logic is easiest when you separate the steps. Your instinct to use XLOOKUP was sound. Your mistake was expecting it to do everything at once. A spreadsheet that ships smarter is one that lets you see each decision, not one that hides them in a nested formula. Start with the table. Build the columns. Then let the formula be the last thing you write, not the first.