Counting columns using VBA

  • Thread starter Thread starter Marcus
  • Start date Start date
M

Marcus

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
 
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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top