Count & What IF Statement

rhjake23

New Member
Joined
Dec 20, 2017
Messages
35
Hello.

I am trying to do the following.

If range A1:A1000 = "ABC" then count range B1:B1000

FYI there are formulas in range B1:B1000
so when in Excel and I highlight B1:B1000 i get a count of 1000..not sure why ....maybe because each cell has a formula ?
Please Help !! Thank you.
 
Book1
ABCDE
75
8a2
9a3
10a4
11a5
12a35
13b32
14b3
15b4
16b5
17c6
18c4
19c3
20c3
21c2
Sheet1
Cell Formulas
RangeFormula
E7E7=COUNTIF(A8:A21,"a")
 
Upvote 0

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.
Sorry for all the confusion.
please see attached
Thank you.

1601836915877.png
 

Attachments

  • 1601836819352.png
    1601836819352.png
    27.1 KB · Views: 5
Upvote 0
How about
Excel Formula:
=COUNTIFS(D:D,"ABC",E:E,">0")
 
Upvote 0
Thanks.
I get 0 as a result. Is that because I have formulas in Column E to get a value in the first place?
 
Upvote 0
A formula in col E shouldn't make any difference
+Fluff v2.xlsm
CDEFG
5
6117ABC 4
7175ABC 6
8286ABC2.86
9253ABC 
10119ABC 
11220ABC2.2
12159ABC 
13200ABC2
14255ABC 
15112ABC1.12
16222XYZ2.22
17253XYZ 
18153XYZ 
19237XYZ 
20220XYZ2.2
21
Data
Cell Formulas
RangeFormula
C6:C20C6=RANDARRAY(15,,100,300,1)
G6G6=COUNTIFS(D:D,"ABC",E:E,">0")
G7G7=COUNT(E6:E20)
E6:E20E6=IF(ISEVEN(C6),C6/100,"")
Dynamic array formulas.


What do you get if you use the formula i've got in G7?
 
Upvote 0
Hi. I copied the values in Column E to another cell off to the right.... to get an integer ... the formula you previously gave me now works!
Probably an extra step..but I'm good with that....
Can I do a countif (a1:a10),"TEST",sum (b1:b10).... ? not sure the correct syntax..
ie...I want to get a sum of the values now...vs. the actual count.
THANK YOU!
 
Upvote 0
How about
+Fluff v2.xlsm
CDEFG
5
6128ABC1.286.36
7143ABC 
8159ABC 
9155ABC 
10296ABC2.96
11135ABC 
12103ABC 
13212ABC2.12
14289ABC 
15217ABC 
16205XYZ 
17260XYZ2.6
18118XYZ1.18
19280XYZ2.8
20189XYZ 
Data
Cell Formulas
RangeFormula
G6G6=SUMIFS(E:E,D:D,"ABC",E:E,">0")
E6:E20E6=IF(ISEVEN(C6),C6/100,"")
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,312
Messages
6,177,812
Members
452,806
Latest member
Workerl3ee

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