Formula for calculating items in cell

zchang

New Member
Joined
Jul 18, 2011
Messages
5
Hello, I am a newbie so please bear with me. I want to calculate the items in a cell range (e.g. A1:E1) that contain comma separated lists but I don't want to count values like N/A or n/a. I would like to input the total in one cell. So, the data would look something like this:

Rick,Sally,Susan N/A David,Randy,Bob n/a Phil 7(total number)

Any suggestions on how I should accomplish this?

Thanks for any help in advance.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi and Welcome to the Board
As "A1:E1" is only 5 cells...how do you get 7 as your result ?
If that's a typo, try something like
Code:
=COUNTIF(A1:E1,"<>n/a")

On reading this a little closer, can I assume all the names are in one cell.
If so, try using Text to Columns" first to seperate each name into a new cell, and then use the above formulae
 
Last edited:
Upvote 0
Hi

Assuming each cell either has a comma separated list or n/a(N/A), like in the example, try:

=SUMPRODUCT(1+LEN(A1:E1)-LEN(SUBSTITUTE(A1:E1,",","")))-COUNTIF(A1:E1,"n/a")
 
Last edited:
Upvote 0
Thanks Micheal M and PGC for the reply. PGC, your formula was exactly what I needed!! Thanks again guys.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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