Results 1 to 5 of 5

Thread: Cannot get an excel macro to work in google docs

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Jan 2018
    Posts
    38
    Location

    Cannot get an excel macro to work in google docs

    Hello,

    I have a macro that works in an Excel worksheet, but when copying to a google doc, it does not. I am hoping that I can get help with converting the macro to work in google docs.

    Here is the macro that works in Excel.

    Sub ConvertRunNumber()
        For x = 1 To 8000
            RunNum = Cells(x, 1).Value
            Newrunnum = Left(RunNum, 8)
            Cells(x, 2).Value = Newrunnum
            Range("B2").Value = Newrunnum
            Cells(x, 2).NumberFormat = "0"
        Next x
    End Sub
    Here is the macro in google docs that fails.




    Syntax error: SyntaxError: Unexpected identifier 'ConvertRunNumber' line: 2 file: Missing Numbers.gs
    Attached Images Attached Images
    Last edited by Aussiebear; 02-25-2025 at 03:59 PM. Reason: attached screen shot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •