Using INDIRECT as part of a COUNTIF when part of it is a text string

cybastov

New Member
Joined
Mar 31, 2012
Messages
31
Hi

I am guessing this is easy meat for most of you out there, I am new to using INDIRECT, I am still struggling to understand some of the functions, tried using the Excel help and this is still not working for me.

My formula is easy

COUNTIF(Details!C:C,"Incorrect code")

What I want is an INDIRECT to use B1 which has the words incorrect code in it, but I cannot get it to work, not sure if I am not using " in the right place, or if I should be using ', I really want to use INDIRECT as I have a lit of words, and want only 1 formula to count how many times those words appear in the sheet called Details.

Thanks in advance.

Stov
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
If B1 is equal to Incorrect code you can simply use
=COUNTIF(Details!C:C,B1)

You don't have to use INDIRECT.

M.
 
Last edited:
Upvote 0
I need help... I am trying to use countif with indirect but am confused... what I need is to countif a range say E6:e65...the range cells will contain initials like CC, TJ, LY and so forth... I want to use another cell like N5 to dictate which initials I am looking for..
for instance if N5 contains TJ then excel will look through the E6:E65 range to see how many times the initials are used.... can anyone hep me with this????
Or is there a better way to do this?
Thanks
 
Upvote 0
Hello tonwj, welcome to MrExcel

It's better in most cases to start your own thread rather than piggyback on an old one (threads with zero replies will generally get more attention)

I'm not sure why you need INDIRECT, a basic COUNTIF like this seems to suffice

=COUNTIF(E6:E65,N5)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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