update sheet 2 with sheet 1 after update/change

k03074

Board Regular
Joined
Mar 28, 2013
Messages
57
Is there something in vba excel to update sheet2 from a search with the value from the sheet1 from after been updated.

For example

Sheet 1
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer 1
[/TD]
[TD][/TD]
[TD]Time In:
[/TD]
[TD]1:00
[/TD]
[/TR]
[TR]
[TD]Customer 2
[/TD]
[TD][/TD]
[TD]Time In:
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Customer 3
[/TD]
[TD][/TD]
[TD]Time In:
[/TD]
[TD]14:00
[/TD]
[/TR]
[TR]
[TD]Customer 4
[/TD]
[TD][/TD]
[TD]Time In:
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Customer 5
[/TD]
[TD][/TD]
[TD]Time In
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Sheet 2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer 1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Time In:
[/TD]
[TD]1:00
[/TD]
[/TR]
[TR]
[TD]Customer 2
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Time In:
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Customer 3
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Time In:
[/TD]
[TD]14:00
[/TD]
[/TR]
[TR]
[TD]Customer 4
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Customer 5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I would like to have sheet2 to be update with the Time In values as soon as they get entered in from sheet 1.

I have tried match/index formula in sheet 2, but it populates my cells with zeros (0:00:00) and it messes my conditional format that I have in place in sheet 2.

Any suggestions?

Thank you,
Gerald
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try this:

Assuming your data in both sheets will be in columns A B and C

Try this:
When you change a value in Column 3 of Sheet(1) The same data will be entered in column 3 of sheet 2

This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet1 tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Modified  2/14/2019  9:27:07 PM  EST
If Target.Column = 3 Then
If Target.Cells.CountLarge > 1 Or IsEmpty(Target) Then Exit Sub
Dim SearchString As String
Dim SearchRange As Range
SearchString = Target.Offset(, -2).Value
Dim lastrow As Long
lastrow = Sheets(2).Cells(Rows.Count, "A").End(xlUp).Row
Set SearchRange = Sheets(2).Range("A1:A" & lastrow).Find(SearchString, LookIn:=xlValues, lookat:=xlWhole)
If SearchRange Is Nothing Then MsgBox SearchString & "  Not Found": Exit Sub
SearchRange.Offset(0, 2).Value = Target.Value
End If
End Sub
 
Last edited:
Upvote 0
I assume you mean this worked for you.
Glad I was able to help you.
Come back here to Mr. Excel next time you need additional assistance.

Thanks for your answer here. It helped me out.

Regards,
Gerald
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,988
Members
452,541
Latest member
haasro02

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