PDA

View Full Version : Help on macro to fetch data from one sheet and post on the other



preond
04-21-2016, 06:07 AM
i am very weak on the macros and need help on it for the attached workbook. It is time sheet workbook, where the employee will be entering the details about the date, which project they have worked and time spent on the project (“Weekly report”). The second work sheet gives me the project wise breakup on each day for the month. The third sheet gives me the weekly break up (percentagewise).

I need a macro where in if the employee has not worked on any weekly off then the macro should fetch the data from Weekwise report and post it “weekly report” in the first available blank row, based on which week that week-off is on. The data that needs to be posted on the weekly report is first the date followed by “project Number” to “Project No.” then “From No.” to “From hr.” then “Break” to “break” and “to No.” to “to hr.” and should post “Weekly off” in “task description”. It will show on “Project wise sheet” on which weekoff the employee has not worked.

Attached is a sample file with data.

Regards,
Prem Tourani.

preond
04-24-2016, 12:48 AM
Some one please help.

Aussiebear
04-24-2016, 01:51 AM
Can you break this section down into the steps it would take to complete the task please?

"I need a macro where in if the employee has not worked on any weekly off then the macro should fetch the data from Weekwise report and post it “weekly report” in the first available blank row, based on which week that week-off is on. The data that needs to be posted on the weekly report is first the date followed by “project Number” to “Project No.” then “From No.” to “From hr.” then “Break” to “break” and “to No.” to “to hr.” and should post “Weekly off” in “task description”. It will show on “Project wise sheet” on which weekoff the employee has not worked."

I have not heard the term Weekly off but I'm assuming its the same as Week Off.

preond
04-24-2016, 05:55 AM
Hi Aussiebear,

Thank you looking into my query, please find below the step wise breakup and the copy of the workbook with the end result highlighted with thick red border.

1. To look for “not worked on a week-off” in Column R in “Project Wise” work sheet.

2. Then look for “date” (Column A, the first instance is 4th March 2016) and “Week Number” (Column Q, the first instance is 1) in the same row in
“Project Wise” work sheet.

3. Copy the list “Project Number”, “From”, “Break” and “To” from Week 1 table on “Weekwise breakup” Sheet.

4. Paste the “Project Number” to “Project No” (Column M), “From” to “From Hr” (Column N), “Break” to “Break” (Column O) and “To” to “To hr” (Column P) in the first available empty row in “Weekly Report”.

5. Copy the same date for all the rows.

6. Write “Weekly off” in “column L” in respective row.

Repeat this step for all weeks.

Appreciate your help.