Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting 3 columns? | Excel Discussion (Misc queries) | |||
counting columns | Excel Discussion (Misc queries) | |||
Counting in columns | Excel Worksheet Functions | |||
counting in columns | Excel Worksheet Functions | |||
Counting in two columns | Excel Worksheet Functions |