countif ignoring blank cells

rjwalker2514

New Member
Joined
Aug 4, 2018
Messages
7
COLUMN ACOLUMN BCOLUMN CCOLUMN DCOLUMN ECOLUMN FCOLUMN GCOLUMN H
ROW 134
ROW 23234
ROW 3123234

I am using a COUNTIF function but do not want it to count the blank cells. Example

I enter into cell E1 =COUNTIF($A$1:D1,A1) the result is correct (1) but then if I drag that across, cells G1&H1 also show (1) as it has counted the blank...

The actual results I want to see are:
E1 (1)
F1 (0)
G1 (0)
H1 (0)
E2 (1)
F2 (2 as its the second time 34 appears)
G2 (0)
H2 (0)
E3 (1)
F3 (2 as its the second time 32 appears)
G3 (3 as its the third time 34 appears)
G4 (0)

thanks for any help
 

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.
How about
+Fluff.xlsm
ABCDEFGH
1COLUMN ACOLUMN BCOLUMN CCOLUMN DCOLUMN ECOLUMN FCOLUMN GCOLUMN H
2341000
332341200
41232341230
Report
Cell Formulas
RangeFormula
E2:H4E2=IF(A2="",0,COUNTIF($A$2:D2,A2))
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,918
Messages
6,175,365
Members
452,638
Latest member
Oluwabukunmi

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top