Identify Last Column , and Extract the Last Column based on a condition on the Column Header, else Extract the Second Last Column

I have an Excel that has column headers with date values.
I want to Identify the Last Column and extract the entire last column IF the
Header of Last column - Current Date < 10
ELSE
Extract the second last column

(Note: The column names keep changing because they are dates. Also number of columns will increase each month. Its not static)

Could you please share how this can be done.

You could use Column Name extractor to first extract the column names then do your check (e.g. column expression node or sth like this) and then based on the result choose your column
as an idea to get started
br

Thanks Daniel. My column name will keep changing because it is a date . For example 08/01/2023. Next Month it will be 09/01/2023 and so on.

So basically there will be a new LAST column each month. The column header name and columns location will change because new month will be created in a new column.
For example: 8-2023 | 9-2023 | 10-2023 | 11-2023 |

Are these actually dates or strings with a “date format”? It would be helpful if you could provide an actual data file (blinding any proprietary info.)

Example - Copy.xlsx (9.6 KB)
Here you go…

Try this.

1 Like

Did the workflow I posted address your issue?

Yes it did, thanks so much @rfeigel!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.