Cell Reference?

ie12041952

New Member
Joined
Mar 1, 2017
Messages
7
This should be pretty straight forward but I can't get it to work. I want to be able to enter a date in a cell in the first sheet and have it auto-fill a cell in a second sheet. I'm able to do that but when I sort the data in the first sheet the date in the second sheet changes to whatever date is now in the referenced cell. I've tried every combination of cell references and also tried to link the cells but in all cases the date changes when sorted.

I'd appreciate any help. Thanks.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Use a worksheet event. It will hardcode the values into the cells rather then using a formula:

Code:
'This code goes in the Sheet1 worksheet code module
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 1 Then 'Check if the data is being entered into column 1
        Sheets("Sheet2").Range ("A" & Target.Row) 'if so duplicate the data entered in column 1 in Sheet2
    End If
End Sub
How to insert code:
https://www.ablebits.com/office-addins-blog/2013/12/06/add-run-vba-macro-excel/
 
Upvote 0
Name the cell in the first sheet and use the name in the formula on the second sheet, then whenever you sort the first sheet should still refer to the same cell even if it has moved.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
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