# Count the cells in certain specific column with condition

#### Surajitneog

##### New Member
Sir
In a table, how can I count the number of cells (row wise) in certain specific columns (say column no 1, 4, 8, 12 etc) which meets certain given conditions (e.g value >100).

Thanks

Surjitneog

### Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi there,

Assuming your cols always go up in 4's, try:

Code:
``````Sub test()
For i = 1 To 12 Step 4
If i = 5 Then i = 4
If Cells(4, i).Value > 100 Then x = x + 1
Next
Range("a1").Value = x
End Sub``````

Hi there,

Assuming your cols always go up in 4's, try:

Code:
``````Sub test()
For i = 1 To 12 Step 4
If i = 5 Then i = 4
If Cells(4, i).Value > 100 Then x = x + 1
Next
Range("a1").Value = x
End Sub``````

Hi James
Thanks for the answer. You are using macro here. Cannot you solve the problem in simple excel formula? I am not very much conversant with macro.

Surajitneog

Let's assume A1:A10 contain numbers. Place this into B1

=COUNTIF(A1:A10,">100")

There are more advanced methods such as INDEX/MATCH and SUMPRODUCT that will allow for multiple criteria based on neighbouring column values etc

Countif would be the simpler version of it.

Hi
Probably u r not going through my question properly. In want the no. of cells in certain specific columns and not in the entire range of columns of the table.

Thanks
Surajitneog

for each cell you could use =CountIfs

tho still have to specify a range...

Replies
1
Views
100
Replies
2
Views
180
Replies
3
Views
245
Replies
1
Views
302
Replies
8
Views
608

1,203,255
Messages
6,054,403
Members
444,723
Latest member
Gagan sree ram

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back