VBA code for adding data from a sheet to another

Atlantis764

New Member
Joined
Jan 10, 2022
Messages
21
Office Version
  1. 2019
Platform
  1. Windows
Hi all,

please help with the VBA code for the following issue:
I am adding some data in a sheet (Database) for some experts in a project - Year, Month, Date, Name, Activity, Sub-activity and Worked Hours.
Is it possible to have a VBA code that every time I am manually add a new entry to this sheet automatically search and add the values from Column H "Worked hours" in the corresponding cell from another sheet (Database1)?
I've made with the same colors the values from the first sheet with the corresponding cell from the second sheet:
- the value from H2 cell (Database) to be added in D2 cell (Database1) because the name is John, the Activity is A.1, Sub-activity is A.1.1 and the Month is November 2022 (with yellow)
- the value from H5 cell (Database) to be added in G20 cell (Database1) because the name is Anne, the Activity is A.2, Sub-activity is A.2.1 and the Month is February 2023 (with gray) and so on.
Many thanks in advance!
Liviu
Work_file_2023.xlsx
H
5100
Database

Work_file_2023.xlsx
G
20
Database1
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

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