VBA to avoid duplicate row entries in Masterfile with Msgbox

NewUserPri

New Member
Joined
Sep 25, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi People,

I am new to VBA and got stuck in the middle of the project. I will state the whole scenario below:-

So, I have two workbooks namely 1) DailyData 2) MasterFile (This file includes data for all the dates for a month)
I used to transfer whole data from DailyData to MasterFile using VBA code but the problem arises when the data gets transferred twice or thrice mistakenly by clicking on the activebutton.
Please help to avoid this issue and get me a solution by leveraging and using MsgBox warning statement for this.
I want copied data from DailyData to compare data present in MasterFile if it's duplicate then stop the code and exit sub with a msg data already present in masterfile else if data is partially present then add new data in masterfile and donot copy already present data and third if data is not present then paste the whole new data available to masterfile.

Please help if anyone knows how to work through this. I hope you guys get my point if not please feel free to connect by commenting the issue..
Hoping for positive replies. Thanks in advance...
 

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.
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of the DailyData sheet and the MasterFile sheet. Alternately, you could upload a copy of your two files to a free site such as www.box.com or www.dropbox.com. Once you do that, mark each file for 'Sharing' and you will be given a link to each file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0

Forum statistics

Threads
1,214,901
Messages
6,122,157
Members
449,068
Latest member
shiz11713

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