Certainly! Here's the modified formula based on your requirements:
Remove the day of week (ddd) text in column A — so the output starts directly with the date column.
Pull any date (no restriction to the next 2 work weeks).
Your original formula:
gsheets Copy code
=LET(
start,TODAY()-WEEKDAY(TODAY(),2)+1,
end,start+11,
data,{'IMPORT - OPOR'!T:T,'IMPORT - OPOR'!D:D,'IMPORT - OPOR'!H:H,'IMPORT - OPOR'!M:M,'IMPORT - OPOR'!I:I,'IMPORT - OPOR'!P:P},
list,SORT(FILTER(data,(INDEX(data,,1)>=start)*(INDEX(data,,1)<=end)*(WEEKDAY(INDEX(data,,1),2)<=5)),1,TRUE),
{ARRAYFORMULA(TEXT(INDEX(list,,1),"ddd")),list}
)
Modified formula:
gsheets Copy code
=LET(
data, {'IMPORT - OPOR'!T:T, 'IMPORT - OPOR'!D:D, 'IMPORT - OPOR'!H:H, 'IMPORT - OPOR'!M:M, 'IMPORT - OPOR'!I:I, 'IMPORT - OPOR'!P:P},
filtered, FILTER(data, LEN(INDEX(data,,1))), // Filter out rows where date is blank
sorted, SORT(filtered, 1, TRUE),
sorted
)
Explanation:
Removed the start and end date filtering — so it pulls all rows with any date in column T.
Removed the weekday filter — so it includes weekends as well.
Removed the ARRAYFORMULA(TEXT(...)) that added the day of week column.
Added a filter to exclude rows where the date is blank (LEN(INDEX(data,,1))).
Sorted by the date column ascending.
If you want to filter for dates only after today (or any other condition), you can add a condition inside the FILTER function, for example:
gsheets Copy code
FILTER(data, (INDEX(data,,1) >= TODAY()) * LEN(INDEX(data,,1)))
Let me know if you want me to customize it further!