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
Customer 1
Time In:
1:00
Customer 2
Time In:
Customer 3
Time In:
14:00
Customer 4
Time In:
Customer 5
Time In

<tbody>
</tbody>

Sheet 2
Customer 1
Time In:
1:00
Customer 2
Time In:
Customer 3
Time In:
14:00
Customer 4
Customer 5

<tbody>
</tbody>

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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,214,585
Messages
6,120,399
Members
448,958
Latest member
Hat4Life

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