+ Reply to Thread
Results 1 to 3 of 3

Search column in sheet and check against date in another column

  1. #1
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 2013
    Posts
    332

    Search column in sheet and check against date in another column

    Hello ... I have a situation here that I will explain the best I can for what I need to have added to the existing code.

    In the attached workbook, I start with Sheet2 where I have a static inventory list of stamps to be assigned to a person. In the userform, when I "Create New Employee", it searches sheet2 to make sure that the number exists. If it does, it allows the information to be added to sheet1 unless sheet1 already has the that number assigned. This all works fine...

    The next part is, I move employees and numbers to sheet (historical record). On that sheet, I have the column checking for a date older than x amount of months. What I need to have is, when a new employee is created on the form, not only do I check sheet2 for existance and sheet1 for a duplicate, I need to be able to also check "Historical Record" for a duplicate in column A .... AND check column G in historical record to be sure it is older than 6 months.

    What this does is, when a number is used in Sheet1 and then sent to history, the same number cannot be used again for 6 months. I hope I explained clearly as to what I need to add to this.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,162

    Re: Search column in sheet and check against date in another column

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 2013
    Posts
    332

    Re: Search column in sheet and check against date in another column

    That is a good point... This was solved based on another post. Here is the code that solved my problem:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1