LibreOffice Calc. How to add a number to all cells?

How to in LibreOffice Calc to add to all cells a certain number?
I have over 800 rows in the price list, you need to add to all +60 rubles.
How to do it quickly?
You also need to consider that between the positions of the is and empty string.
July 8th 19 at 16:12
2 answers
July 8th 19 at 16:14
Sub Main
 Dim inc, row As Integer
 Dim rows, col As Integer
 Dim x As Object

 inc = 60 ' how to increase the number
 rows = 20 ' the Number of rows scanned
 col = 0 ' column Number for increasing values of

 oDoc = ThisComponent
 row = 0
 Do While (row < rows)
 x = oDoc.Sheets(0).getCellByPosition(col, row) ' the First page of the current element (index 0)

 'Check type of the cell
 Select Case x.Type
 'If the number
 oDoc.Sheets(0).getCellByPosition(col, row).setValue(x.Value + inc)
 'If the text
 'If empty
 'If formula

 End Select

 row = row + 1
End Sub
July 8th 19 at 16:16
In a separate cell put the amount the size of which you want to increase all the rest ( in this case 60). Next, the copy button (to copy the cell 60). Select all the numbers that need to increase, then the function "paste Special" choose operation "Fold" and click OK

Find more questions by tags LibreOfficeExcel