Update info from one worksheet to the master worksheet

joelui

New Member
Joined
Nov 3, 2011
Messages
25
Staff Number
6/12/2018
7/12/2018
8/12/2018
200123
D
D
D
PC1223
OFF
OFF
D

<tbody>
</tbody>
Table1 (DailyUpdate)

Staff Number
1/12/2018
2/12/2018
3/12/2018
4/12/2018
5/12/2018
6/12/2018
7/12/2018
8/12/2018
9/12/2018
200123
D
D
D
D
D
AL
OFF
OFF
OFF
200156
OFF
D
D
D
D
D
OFF
OFF
OFF
200171
AL
AL
AL
AL
AL
AL
OFF
OFF
OFF
PC1223
D
D
D
D
OFF
OFF
D
D
D

<tbody>
</tbody>
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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
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
thanks for the feedback
happy 2019
(y)
 
Upvote 0

Forum statistics

Threads
1,215,077
Messages
6,122,991
Members
449,094
Latest member
masterms

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