I want to create a macro which will call another macro until it reaches "end of data"

I read data fro a meter into calc. This is a different number of rows from one read to another and want to create a macro which will call another macro until it reaches “end of data”

Do you mean “read data from sheet of workbook row by row”? Oh, don’t do that! It will be very slow!

no I have a worksheet which is created from data read from a meter which gives the results in the wrong units. The sheet is in 3 columns, A) date, B) time, C) result. I then wish to convert the results to the correct units, a simple multiply and pasting as values in a 4th column, D). Having done that I then rearrange the results by taking the result from row 2, D4 and paste that in cell A5. I have 2 macros that carry out both of these. I then need to repeat the second until I reach end of data.

I currently do this by assigning a Func. key to the second macro and repeatedly press it!!

OK. Can you upload your workbook with macro and some remarks about converting data between columns?

Just get sheet with data

  oSheet = ThisComponent.getSheets().getByName(<name_of_sheet>)

Then create a cursor for this sheet

  oCursor = oSheet.createCursor()

Do it’s method gotoEndOfUsedArea()

  oCursor.gotoEndOfUsedArea(True)

Get ALL data to array of arrays

  oDataArray = oCursor.getDataArray()

And work with it

  For i = LBound(oDataArray) To Ubound(oDataArray)
    oneRow = oDataArray(i)
... do something with data of row - array oneRow...
  Next i

That looks hopeful will try it and get back

Works fine thanks very much