Update info from one worksheet to the master worksheet

joelui

New Member
Joined
Nov 3, 2011
Messages
25
[TABLE="width: 500"]
<tbody>[TR]
[TD]Staff Number
[/TD]
[TD]6/12/2018
[/TD]
[TD]7/12/2018
[/TD]
[TD]8/12/2018
[/TD]
[/TR]
[TR]
[TD]200123
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD] PC1223
[/TD]
[TD]OFF
[/TD]
[TD]OFF
[/TD]
[TD]D
[/TD]
[/TR]
</tbody>[/TABLE]
Table1 (DailyUpdate)

[TABLE="width: 500"]
<tbody>[TR]
[TD]Staff Number
[/TD]
[TD]1/12/2018
[/TD]
[TD]2/12/2018
[/TD]
[TD]3/12/2018
[/TD]
[TD]4/12/2018
[/TD]
[TD]5/12/2018
[/TD]
[TD]6/12/2018
[/TD]
[TD]7/12/2018
[/TD]
[TD]8/12/2018
[/TD]
[TD]9/12/2018
[/TD]
[/TR]
[TR]
[TD]200123
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]AL
[/TD]
[TD]OFF
[/TD]
[TD]OFF
[/TD]
[TD]OFF
[/TD]
[/TR]
[TR]
[TD]200156
[/TD]
[TD]OFF
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]OFF
[/TD]
[TD]OFF
[/TD]
[TD]OFF
[/TD]
[/TR]
[TR]
[TD]200171
[/TD]
[TD]AL
[/TD]
[TD]AL
[/TD]
[TD]AL
[/TD]
[TD]AL
[/TD]
[TD]AL
[/TD]
[TD]AL
[/TD]
[TD]OFF
[/TD]
[TD]OFF
[/TD]
[TD]OFF
[/TD]
[/TR]
[TR]
[TD]PC1223
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]OFF
[/TD]
[TD]OFF
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Table2 (Master)

Hi all,

Happy New Year Eve!

I hope someone can help me with the below.

I have 2 worksheets, first worksheet called "DailyUpdate" (table 1 above) & second worksheet called "Master". each day I will get a daily report but not all staff will appear on the report and I want a VBA that can go and update the Master worksheet based on what is on the "DailyUpdate" file and replace the cells with what is in "DailyUpdate"

Is it possible to have a msg box prompt a user if there is a new staff showing on DailyUpdate not in the Master file....


Thanks,
Joe
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Is it possible to have a msg box prompt a user if there is a new staff showing on DailyUpdate not in the Master file..

One way..
Code:
Sub MsgBoxNewEmployees()
    Dim wsU As Worksheet, wsM As Worksheet, newEmp As String, rngM As Range, cel As Range
    Set wsU = Sheets("Daily Update")
    Set wsM = Sheets("Master")
    Set rngM = wsM.Range("A2", wsM.Range("A" & Rows.Count).End(xlUp))
        For Each cel In wsU.Range("A2", wsU.Range("A" & Rows.Count).End(xlUp))
            If WorksheetFunction.CountIf(rngM, cel) = 0 Then newEmp = newEmp & vbCr & cel
        Next cel
    If newEmp <> "" Then MsgBox newEmp, , "Additional Employees"
End Sub
 
Upvote 0
Cross posted https://chandoo.org/forum/threads/v...ne-worksheet-to-another-date-and-value.40571/

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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