+ Reply to Thread
Results 1 to 2 of 2

Counting columns using VBA

  1. #1
    Marcus
    Guest

    Counting columns using VBA

    I want to be able to count the number of days an employees
    had taken hols.

    I have set up a spreadsheet which indicates this

    It is possible using VBA to count 5 columns out of every 7
    for the entire year and output the results to another
    spreadsheet. I will always start on the 1st monday and
    will be dealing with around 250 employees (rows)

    Thanking you in advance
    Marcus

  2. #2
    Tom Ogilvy
    Guest

    Re: Counting columns using VBA

    fiveoutof7 = Int(256/7)*5

    Perhaps you can say what you are trying to count (what indicates something
    should be counted) - how it is determined if a column is counted or the
    extent of the columns to count.

    Without that, the best suggestion is to explore use of the CountIf
    worksheet function and skip a macro.

    =countif(B2:IV251,"hol")



    --
    Regards,
    Tom Ogilvy

    "Marcus" <[email protected]> wrote in message
    news:[email protected]...
    > I want to be able to count the number of days an employees
    > had taken hols.
    >
    > I have set up a spreadsheet which indicates this
    >
    > It is possible using VBA to count 5 columns out of every 7
    > for the entire year and output the results to another
    > spreadsheet. I will always start on the 1st monday and
    > will be dealing with around 250 employees (rows)
    >
    > Thanking you in advance
    > Marcus




+ 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