Copying ranges from one sheet to another when cells match on both sheets

batesy2000

New Member
Joined
Apr 14, 2016
Messages
8
I hope I can explain this concisely. I've attached a spreadsheet to help

Sheet Monday there is a list of people in beds with populated information

On the Tuesday (Sheet Tuesday) some of these people may move bed, stay in the same bed or go completely with new ppl in their bed

I need to work out how to copy the persons information from Monday to Tuesday taking into consideration some may have moved or gone altogether so I guess it's like a conditional copy and paste where

If the person in the bed on Monday matches the one in the bed on Tuesday then their info in that row is copied over, if it doesn't match because it's a new person then it remains unpopulated

If bed and person are the same copy the values from H:P to Tuesday from Monday

If the person is the same but in a different bed still copy the values

If there are already values in Tuesday you overwrite,

Hopefully someone can advise

Kind Regards

Matt
 

Attachments

  • Monday.png
    Monday.png
    109.4 KB · Views: 4
  • Tuesday.png
    Tuesday.png
    109.9 KB · Views: 4

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I apologize because I'm not sure how much I had time to help, but I believe my questions will also help other potential helpers.

On the Tuesday (Sheet Tuesday) some of these people may move bed, stay in the same bed or go completely with new ppl in their bed
1. What is new ppl?

If there are already values in Tuesday you overwrite,
2.0 Overwriting requires always using VBA.
2.1 If Prioritization is gray on Monday, but red is marked for Tuesday, do you really want the red to be overwritten back to gray?

3. Copying data from the previous day requires the use of VBA macros and destroys the manual changes made to the next day. (In section 2.1)

4. I don't think beds are part of your question for us. You want the person's information always move to the same row where the person's name appears?

5. Without VBA, the solution would be to add one sheet like "CustomerSheet", where the customer's information is always written. (Just like Monday, but without the bed)
Then the customer's name is written next to the desired bed on the desired day and all other customer's information is retrieved from the CustomerSheet. (For example, using functions like Index and Match)
 
Upvote 0
I apologize because I'm not sure how much I had time to help, but I believe my questions will also help other potential helpers.


1. What is new ppl?


2.0 Overwriting requires always using VBA.
2.1 If Prioritization is gray on Monday, but red is marked for Tuesday, do you really want the red to be overwritten back to gray?

3. Copying data from the previous day requires the use of VBA macros and destroys the manual changes made to the next day. (In section 2.1)

4. I don't think beds are part of your question for us. You want the person's information always move to the same row where the person's name appears?

5. Without VBA, the solution would be to add one sheet like "CustomerSheet", where the customer's information is always written. (Just like Monday, but without the bed)
Then the customer's name is written next to the desired bed on the desired day and all other customer's information is retrieved from the CustomerSheet. (For example, using functions like Index and Match)
1. New people is when a new person on Tuesday occupies a bed

2. We could ignore overwriting as in theory the only columns populated on a Tuesday will be Bed and Person Name

2.1 The prioritise column should follow the person

3.0 The only information I expect to see on Tuesday before running any VBA is bed and name. Everything else should hopefully then copy from Mon to Tues

4.0 Yes you're correct with that. The Bed will never move. It's all about the person name

Thanks for your help
 
Upvote 0
Is the problem of your question a theoretical problem, a school assignment or a practical problem that could be used in reality somewhere?

It's none of my business, but I'm asking because the following questions aren't necessary if we're talking about theory or a school assignment.

1.1 We talked about Monday's data for Tuesday, but I assume the interest is always the previous day?
1.2 Is Friday the day before Monday, or is Monday always new?

When, how and where would macros be executed?

When: Once a day, when desired, when the name of the client in the bed changes or based on something else?

How: Someone runs a macro, someone presses the macro button, automatically when the name of the client in the bed changes, or some other way?

Where: We will move from Tuesday's sheet to Wednesday's sheet, but depending on the answers to the previous questions that should be specified as well?

(Wednesday's macro retrieves Tuesday's data, but can Monday's data still be copied at the same time to Tuesday and thereby to Wednesday?
Actually, the question is still about the data changing. Are the customer's data always the same as on the first bed day, and there is never an attempt to change that data?)
 
Upvote 0

Forum statistics

Threads
1,214,868
Messages
6,122,005
Members
449,059
Latest member
mtsheetz

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