push result from one cell to another

N

Neall

Good day,

I have a tally sheet that can be used to manually enter data in cell D18,
but in most cases it will be automatically be populated from a previous
worksheet, what I want to do from cell D19 is get the data from the previous
worksheet and then push it from C19 into C18.

This way users of the tally sheet will be able to enter data manually in C18
if need be or will have the populated data from the previous work sheet.

Any help would be greatly appreciated
Thanks in advance
 
L

Luke M

You alternate between cells D19 and C19. I'll assume you meant C19.

Open the VBA editor (Alt+F11) and go to the ThisWorkbook module.
Paste this in, adjust names/cell references as necessary.

Private Sub Workbook_Open()
Worksheets("Sheet1").Range("C18").Value = _
Worksheets("Sheet2").Range("C19").Value
End Sub

Cell C19 will now be updated whenever the workbook is open.
 
L

Luke M

You alternate between cells D19 and C19. I'll assume you meant C19.

Open the VBA editor (Alt+F11) and go to the ThisWorkbook module.
Paste this in, adjust names/cell references as necessary.

Private Sub Workbook_Open()
Worksheets("Sheet1").Range("C18").Value = _
Worksheets("Sheet2").Range("C19").Value
End Sub

Cell C19 will now be updated whenever the workbook is open.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top