Office Scripts

jaspers

New Member
Joined
Dec 12, 2024
Messages
2
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Thanks in advance new to using scripts vs VBA.
looking for advice on a couple things that i had previously done with VBA and this is my first time attempting to use scripts

Recording data - looking for a method to have the script button take the data inputs of A2:B2 and add them to the next open line in the table below (A3:B400)

Time stamp - i would like cell C4 to be a time stamp of when the data was entered in A4:B4

Any advice is much appreciated Thanks

Screenshot 2024-12-12 202245.jpg
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
like this ?

VBA Code:
Sub jasper()
Application.ScreenUpdating = False

    Dim ws As Worksheet, ls As Long
    Set ws = ActiveSheet
    ls = ws.Cells(Rows.Count, 1).End(xlUp).Row

        With ws
            .Range("A2:B2").Copy .Range("A" & ls + 1)
            .Range("A" & ls + 1).Offset(, 2).Value = Format(Now(), "DD/MM/YY H:MM AM/PM")
        End With
        
MsgBox "Successfull"
End Sub
 
Upvote 0
I will be running this in online office 365 so i cannot use VBA
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top