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

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
countif worksheet

ResolvedVersion 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:

Quick Absolute Cell References

When entering cell references in a formula you probably click the cell, or you may type in the cell reference. If you require any of the 4 variations, press the F4 key now before you press Enter to toggle around the relative and absolute entries ($signs).

Note that the F4 key outside of editing a formula is the Repeat key to repeat a previous action.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.