We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

Macro VBA excel to calc

asked 2018-01-31 12:03:06 +0200

kimal73 gravatar image

updated 2021-06-01 06:54:31 +0200

Alex Kemp gravatar image
 Sub vallerH24()
' valler Macro
' Keyboard Shortcut: Ctrl+Shift+I
     lMaxRows = Cells(Rows.Count, "G").End(xlUp).Row
    Range("G" & lMaxRows + 1).Select
     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
Application.OnTime Now + TimeValue("00:02:00"), "vallerH24"
End Sub
Sub ripeti()
Application.OnTime Now + TimeValue("00:02:00"), "vallerH24"
End Sub

Hello, unfortunately I come from excell microsoft. I have decided not to use it anymore because it is really too heavy. I had created a working macro where I copied a value under a busy column. And gradually more and more below. all this had to happen at a certain time.

I was convinced that the language between the two programs was compatible. instead no.

this is my macro. Anyone can help me?? Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-01-31 15:47:52 +0200

Jim K gravatar image

updated 2018-01-31 15:53:40 +0200

Use APSO to enter this Python code.

from threading import Timer

def append_to_column():
    oSheet = XSCRIPTCONTEXT.getDocument().getSheets().getByIndex(0)
    oColumns = oSheet.getColumns()
    COLUMN_G = ord('G') - ord('A')
    oColumn = oColumns.getByIndex(COLUMN_G)
    oFinder = oColumn.createSearchDescriptor()
    oFinder.SearchRegularExpression = True
    oFinder.SearchString = "."  # match cells that have something in them
    oResult = oColumn.findAll(oFinder)
    if oResult:
        sRange = oResult.AbsoluteName
        last_filled_row = int(sRange.rsplit("$", 1)[1])
        last_filled_row = 0
    new_row = str(last_filled_row + 1)
    cell_to = oSheet.getCellRangeByName("G" + new_row)
    cell_from = oSheet.getCellRangeByName("C5")
    t = Timer(120.0, append_to_column)

g_exportedScripts = append_to_column,


edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-01-31 12:03:06 +0200

Seen: 854 times

Last updated: Oct 28 '20