Atlantis764
New Member
- Joined
- Jan 10, 2022
- Messages
- 17
- Office Version
-
- 2019
- Platform
-
- Windows
Hi all,
First of all I want to say that I am new to VBA code and I need your help.
I need to create a report for the hours worked by some experts on different projects. There are 100 experts that are working in 5 project. Each expert is working in every project.
I have a excel file with 4 sheets.
In the first sheet (named Home) I have a User Form with the following fields: Date, Employee Name (dropdown list), Project No (dropdown list) and No of hours worked.
When I save a new entry this is visible in a List Box in the Form and it is also automatically entered (new row for each new entry) in the second sheet (named Database). There are 4 columns here (from A to D) identically with the fields from the User Form.
The third sheet (named Hours) has 3 columns: Employee Name, Project No and No of hours allocated for each project.
The last sheet (Support) contain the dates for the dropdown lists that are in the User Form.
For the report I need to add in the second sheet (Database) on column E the No of hours allocated for each new entry. I used the excel formula INDEX-MATCH for each row (and copied down to row 10000) and the excel file is working slow because I already have 4000 rows. Because the formula is copied down when I have a new entry in the User Form (and automatically in the Database sheet) column E is automatically filled with the No of hours allocated.
Is there a VBA code to replace (or to avoid) using the Index-Match formula which makes the excel work slow?
Thanks in advance for your help!
First of all I want to say that I am new to VBA code and I need your help.
I need to create a report for the hours worked by some experts on different projects. There are 100 experts that are working in 5 project. Each expert is working in every project.
I have a excel file with 4 sheets.
In the first sheet (named Home) I have a User Form with the following fields: Date, Employee Name (dropdown list), Project No (dropdown list) and No of hours worked.
When I save a new entry this is visible in a List Box in the Form and it is also automatically entered (new row for each new entry) in the second sheet (named Database). There are 4 columns here (from A to D) identically with the fields from the User Form.
The third sheet (named Hours) has 3 columns: Employee Name, Project No and No of hours allocated for each project.
The last sheet (Support) contain the dates for the dropdown lists that are in the User Form.
For the report I need to add in the second sheet (Database) on column E the No of hours allocated for each new entry. I used the excel formula INDEX-MATCH for each row (and copied down to row 10000) and the excel file is working slow because I already have 4000 rows. Because the formula is copied down when I have a new entry in the User Form (and automatically in the Database sheet) column E is automatically filled with the No of hours allocated.
Is there a VBA code to replace (or to avoid) using the Index-Match formula which makes the excel work slow?
Thanks in advance for your help!