• 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.

Help with an Excel Spreadsheet

fzkitty662

New Member
Hi;


I am trying to build a workbook which I can refresh one of the sheets weekly to keep a tally of my vacation accruals, from week to week. I would like sheet1 columnA to look at sheet2 Column A and if the number is present return the value in Sheet2 column C to sheet1 columnI. If the EE number is not in sheet2 I would like it to return a zero.


I can get the sheet to return the value on an individual line by line basis. Unfortunately, I have too many EE's for that, so I need it to look at the entire column and return the proper number.


Your help is much appreciated.


Thank you,


fzkitty
 
Hi fzkitty662,


Why don't you just make one single sheet showing accrued leaves with header row as week num or something similar?


Regards,
 
Try this..


Sub fzkitty662()


Worksheets("Sheet1").Select

Range("a2").Select

For i = 2 To 8 'Selection.End(xlDown).Select

Worksheets("Sheet1").Select

num = Cells(i, 1).Value

Worksheets("Sheet2").Select

For j = 2 To 8 'Selection.End(xlDown).Select

If num = Cells(j, 1).Value Then

newnum = Cells(j, 3)

Worksheets("Sheet1").Select

Cells(i, 2).Value = newnum

Exit For

End If

Next

Next

End Sub
 
Back
Top