countif worksheet

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

TrustPilot

starstarstarstarstar Excellent

  • Home
  • Courses
  • Promotions
  • Schedule
  • Formats
  • Our Clients

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Countif worksheet

Countif worksheet

resolvedResolved · Medium Priority · Version 2016

Zeeshan has attended:
Excel VBA Intermediate course

Countif worksheet

Hi,

I have a workbook with multiple worksheets. One worksheet has a table with names of some of the other worksheets in Column A (from Row 2 downwards) and sequential numbers in Row 1 (Column B rightwards) as shown below. The highest number (i.e. x) in Row 1 is dynamic and can change depending on circumstances.

0 1 2 3 4 5 6 7 ... x
Sheet2
Sheet4
Sheet6
.
.
.

I would like to write a vba code that will count the number of values, corresponding to each value in Row 1 (I.e. 0, 1, 2, 3, etc.), in the last column of each of the worksheets listed in Column A. So cell B2 in the above example would show the number of zeros in the last column in Sheet2.

I will be grateful if you can please advise me on the best way to write this code because I have been finding it difficult to do so.

Thanks very much
Zeeshan


RE: Countif worksheet

Hi Zeeshan

see attached file

Regards

Dennis

Attached files...

Hi Zeeshan.docx


 

Excel tip:

Closing Multiple Open Worksheets At Once

When multiple Excel worksheets are opening, rather than performing a File > Close menu option multiple times, hold down the the SHIFT key and select the File > Close All menu option.

Close All menu option is only displayed when Shift key is down

View all Excel hints and tips


Server loaded in 0.08 secs.