Calc import CSV file with weekly data every fifth row to monthly

I could do this manually but would have some 400 entries to create. I have a CSV file from FRED that has weekly data. I want to import only the first entry for a month to put the data along side another file of data that is monthly. the first row is IC4WSAmax.csv’#$IC4WSAmax.B781 and I would like the second column to be IC4WSAmax.csv’#$IC4WSAmax.B786. I have tried adding to the (B781+5) but that doesn’t work.

If “monthly” indeed is every 5th row then create a helper column (e.g. in column C) beside the data with formula=MOD(ROW();5) and copy that formula down. Then use StandardFilter to filter on 0 and output the filtered result as copy to a different location.

Easier would be to do that on the command line using the awk interpreter with

awk '{if(NR%5==1){print}}' FRED.CSV >filtered.csv

and import filtered.csv to Calc.