+ Reply to Thread
Results 1 to 3 of 3

VBA: Count Items on the Same Line as Active Cell

  1. #1
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    VBA: Count Items on the Same Line as Active Cell

    I'm having some trouble figuring out what the best method is to count items in VBA.

    Recently, I received some help from members in implementing an Employee Search using VBA to help me find employees on a list. Specifically, this list is being used to track the number of Paid Personal Time each employee has. Currently, each employee has 4 days per year (represented by 4 separate columns in my spreadsheet). As a holiday is used, we enter a date into the previously blank cell of that column.

    Basically, what I would like to happen is this. After searching for an employee, Excel selects the employee name that matches the search. I would then like run a count of the next four columns, same row as active cell. If 4 dates have been enterred (meaning all 4 holidays have been used), I would like a msgbox to popup, indicating that this employee has no holidays remaining.

    What is the best way to do this?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    How about

    Please Login or Register  to view this content.

    rylo

  3. #3
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Rylo:

    Thanks for your help. I have integrated the code into my actual worksheet, and it seems to work fine.

+ 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