Hi all,
I'm looking for some help with a code.
Specifically, this is what I need:
1) Search for "Tenure" - IF found do nothing, IF not found insert a column in B for "Tenure", and the appropriate code from below to determine tenure in years.
2) Search for "Age" - IF Found do nothing, IF not found insert a column in D for "Age", and the appropriate code from below to determine age in years
Range("B2").Formula = "=ROUND((TODAY()-A2)/365.25,0)"
Range("D2").Formula = "=ROUND((TODAY()-C2)/365.25,0)"
Dim LastRow As Long
LastRow = Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("B2:B" & LastRow).FillDown
Dim LastRoww As Long
LastRoww = Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("D2:D" & LastRow).FillDown
Basically the same thing, just different wording. In about 10% of the files we receive, people will sometimes only list Tenure and not DOH (date of hire) or Age and not DOB(date of birth) - I need it to check if they already have this information provided otherwise, it needs to run the code to insert this data.
Any help is appreciated.
NOTE: I need them to be seperate for the fact that sometimes we'll receive one and not the other. Thanks.
Bookmarks