Macro to copy data from one sheet to another

Lux Aeterna

Board Regular
Joined
Aug 27, 2015
Messages
201
Office Version
  1. 2019
Platform
  1. Windows
@mumps

I created a new post because the other one I had was a bit confusing.

This is the Demographics sheet. We enter all data manually.

1658608584824.png


This is the Results sheet. Data in the white area is retrieved automatically from the Demographics sheet using an IF function.
For the example, the function that retrieves the name is:
Excel Formula:
=IF(AA3="";Demographics!W5;AA3)
Sometimes there might be a mistake in the retrieved data. That's why manual input (column AA) gets prioritised in the function, for the supervisors to be able to correct it manually.

1658608711564.png


What I'd like to be able to do, is to copy the not empty cells from column AA to the respective cells in Demographics sheet.

AA3 (name) goes to Demographics column C
AA4 (code) goes to Demographics column E
AA5 (age) goes to Demographics column I
AA7 (date 1) goes to Demographics column F
AA8 (place) goes to goes to Demographics column G

AA2 and AA6 are not needed.

Maybe you could add this macro to the other one you wrote earlier today.

By the way, I think I am going to need a small addition to that, if possible. A pop up warning in case column B is already filled. "ID (U2 content) is already printed. Continue?" And a Yes - No choice. If that's tough, don't bother.

Thank you in advance!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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