Copy/Paste Values from one Sheet to another one based on 2 criteria

casper_01

New Member
Joined
May 20, 2020
Messages
10
Office Version
  1. 2016
Hello, I am doing a project were I want some values that are already set up in 1 sheet to be copied and pasted in a different if their criteria Values match.
Sheet 1 looks as follows:

Name Start End Time1 Time2 Time3
Name1 07:00 15:30
Name2 07:00 15:30
Name3 09:00 17:30
Name4 09:00 17:30
Name5 09:00 17:30
Name6 09:00 17:30

Sheet 2 contains the Values I want to copy and paste in Sheet 1 given that B and C Columns Values from Sheet 1 match the Values from Column A and B from Sheet 2.
Sheet 2 looks as follows:

Start End Time1 Time2 Time3
07:00 13:00 10:00 N/A N/A
07:00 15:30 10:00 12:00 14:00
07:00 15:30 10:20 12:20 14:10
07:00 17:30 10:00 12:30 15:30
09:00 17:30 11:00 13:00 15:30
09:00 17:30 11:20 13:20 15:40
09:00 17:30 11:40 13:40 15:50
09:00 17:30 12:00 14:00 16:00
09:00 17:30 12:20 14:20 16:10
09:00 19:30 12:00 14:30 17:30

The list Sheet2 is exhausting and it contains hundreds of rows. Can anyone help me out creating a macro that will have the following outcome:

Name Start End Time1 Time2 Time3
Name1 07:00 15:30 09:00 11:00 13:30
Name2 07:00 15:30 09:20 11:20 13:40
Name3 09:00 17:30 11:20 13:20 15:40
Name4 09:00 17:30 11:40 13:40 15:50
Name5 09:00 17:30 12:00 14:00 16:00
Name6 09:00 17:30 12:20 14:20 16:10

Thanks
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hello, I am doing a project where I want some values that are already set up in 1 sheet to be copied and pasted in another sheet provided the Criteria from Columns B & C from Sheet2 (both simultaneously) are met. Sheet2 looks already as attach image (Sheet2).

In Sheet1 I have pre-added the content I would like to be copied and pasted in Sheet2 if Criteria is met. See attachment (Sheet1). As you can see in in Sheet1 I already have the content that I need to copy on Sheet2. I would like to create an Excel Macro that would do this automatically.

The outcome should look like the attachment (Sheet2 – Outcome).
 

Attachments

  • Sheet2.JPG
    Sheet2.JPG
    34.1 KB · Views: 3
  • Sheet1.jpg
    Sheet1.jpg
    125.3 KB · Views: 3
  • Sheet1.jpg
    Sheet1.jpg
    125.3 KB · Views: 3
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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