VBA code not working:
defines the last row in a table
want to take the sum from cell E4 to the last row of the table (cell LR)?
Sub last()
dim lr as long
lr = activesheet.cells(ActiveSheet.rows.count, "B").End(xlup).Row
Range("E"& lr +3 ).value ="=sum(E4: & E & LR)"
end sub
defines the last row in a table
want to take the sum from cell E4 to the last row of the table (cell LR)?
Sub last()
dim lr as long
lr = activesheet.cells(ActiveSheet.rows.count, "B").End(xlup).Row
Range("E"& lr +3 ).value ="=sum(E4: & E & LR)"
end sub