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.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Try
Excel Formula:
=SUMPRODUCT(--(A1:A1000="ABC"),(B1:B1000))
 
Upvote 0
IS ABC the only text in the cell OR is it part of a string?
Did you copy the formula exactly as written ?
 
Upvote 0
If you are only counting a range , why not simply use...
Excel Formula:
=COUNTIF(A1:A1000,"ABC")
 
Upvote 0
Hi...
no abc is not the only string...
lets say a1:a1000 could be "abc" "def" "ghi"
based on that ...i want the count in b1:b1000

not sure if i am making any sense :)
 
Upvote 0
So, if you put your text in a seperate cell, say D1
then use
Excel Formula:
=COUNTIF(A1:A1000,D1)
You are only counting occurences of the text, so it shouldn't need to be any other column
 
Upvote 0
ok great...
now i'm getting a result...which is good..
the returned result is a sum...and not a count
getting close....
 
Upvote 0
Can you use the XL2BB download (see my tag) to provide a sample of your data and the expected result ?
I can't see how you can get a SUM returned from the formula I provided ?
 
Upvote 0
1601777003504.png
 
Upvote 0

Forum statistics

Threads
1,224,297
Messages
6,177,746
Members
452,797
Latest member
prophet4see

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