Copy Formula

proctk

Well-known Member
Joined
Dec 24, 2004
Messages
839
Hi

I created userform which is used to enter data in to my database. I'm trying to figure out a way so that each time a new entery is keyed

a formula is copied into a cell

Sheet Name: Branchtracking

formula need in in column G = ( column F - Column E - Column D)

Code attached to command button to send data to worksheet

Code:
Private Sub CommandButton1_Click()
Dim iRow As Long
 
   Sheets("BranchTracking").Select
        iRow = Sheets("BranchTracking").Cells(65000, 4).End(xlUp).Offset(1, 0).Row
        
        Cells(iRow, 1).Value = Me.Day.Value
        Cells(iRow, 2).Value = Me.Emp.Value
        Cells(iRow, 3).Value = Me.Activity.Value
        Cells(iRow, 4).Value = Me.Pissued.Value
        Cells(iRow, 5).Value = Me.TOut.Value
        Cells(iRow, 6).Value = Me.TIn.Value
 

Forum statistics

Threads
1,078,252
Messages
5,339,097
Members
399,277
Latest member
Jyoti C

Some videos you may like

This Week's Hot Topics

Top