Need to "autoscroll" to specific column when opening Calc

I have a sheet with 35 columns, and due to font and cell size, half of them are off-screen when in full screen view.

I am trying to “autoscroll” to a specific column based on a “Today()” calculation when opening the sheet.

I cannot find a way to do it with a conditional formula, nor a macro…unless I make 31 unique macros.

So, my first questions is: Is there a way to pass the date results of “Today()”, converted to a simple numerical value of 1-31, to a macro that will then take that numerical value and scroll (left or right) until a column with the label matching the numerical value is at the column 2 position in my sheet?

Example: Say it is the 15th of the month. I open the sheet and no matter where I saved the sheet column wise, it would automatically scroll (left or right) until the column labeled “15” was in the column 2 position in the sheet.

Column 1 is ‘frozen’ to always display, so the column labeled “15” is now adjacent to it for easy matching of new data entry to specific items in column 1 (A) position.

I can convert the results of “Today()” to a simple number 1-31, but don’t see how to pass that to a macro and have it autoscroll that matching column to a physical position in the sheet.

I can record a macro to do this for a specific day, but I need it to work for any of up to 31 days.

Ideas?

Thanks,

MontyJ

Thank you! That does exactly what I want it to!
With a few minor tweaks to labels, I should be able to plug it right into my sheet!
One is I have 12 sheets, one for each month of the year. So with this solution, I can add another routine to select the correct sheet based on actual month as well.

Nice Solution!

MontyJ1

Hello,

Have a look at the attached file, there is a macro attached that will open to sheet1, and position the cursor to the day of the month. The macro is added by, Tools/Customise/Open Document.

Produced using Windows 10 home, LO 7.5.3.2

Let us know if it helps.
LOQ_20230603.ods (14.9 KB)