Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting 3 columns? Owen[_2_] Excel Discussion (Misc queries) 2 November 9th 09 12:01 AM
counting columns NDBC Excel Discussion (Misc queries) 12 July 29th 09 03:07 PM
Counting in columns Deb Excel Worksheet Functions 5 June 11th 09 09:51 AM
counting in columns Mrs T. Excel Worksheet Functions 9 May 2nd 09 10:13 PM
Counting in two columns PedersenJ Excel Worksheet Functions 3 August 8th 06 12:24 AM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"