• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Compare 2 worksheets and update

rajesh2022

New Member
Hello All

I am working on excel workbook, where i will have 2 sheets. Sheet1 and Sheet2.

Sheet 2 will have my raw data, which contains employee names in column A and total hours they worked on Column D. and also user will input which week this data belongs to in I4 cell.

Now, i am trying to compare Employee from Sheet 2 with Employee in Sheet 1 (Column B). In Sheet 1, rows are fixed (From B3: B10), if match found, then i need to check date from Sheet2 I4 Cell and compare in Sheet 1 Row 2. and update hours under that employee.

I have attached sample file.

Can we achieve in vba?
 

Attachments

  • Chandoo.xlsx
    233.6 KB · Views: 4
rajesh2022
Explain - what do You mean about Your used verb compare?
Is there more than one data to update?
... Your sample data is ... short.
Could You use time-values?
 
Sure, i have added few more names to Input and Output sheet.

I will get data in Input sheet, now i need to check names from input sheet into names in Output sheet (Row number 3 to 10 standard rows will not change, but name might be shuffled here, B3:B10), if match found, then check date in Input sheet "I4" and cross check with Output sheet and update hours from INput sheet.

i have highlighted in red color in ouput sheet how my final output looks.
 

Attachments

  • Chandoo.xlsx
    234.2 KB · Views: 2
rajesh2022
I gotta guess some details,
because You seemed to skip some questions.
Select Sheet2 to get possible results.
 

Attachments

  • Chandoo.xlsb
    171.6 KB · Views: 7
Back
Top