To the EXCEL GODS:

Bestill

Senior member
Mar 9, 2001
260
0
0
I have a list of names in Column A. Some names end with an asterisk "*". Is there a way to count how many names in a specific range have an asterisk on the end and display the total number? I tried:

SUM(RIGHT(A1:A5,1)="*")

This didn't work. I also tried:

SUM(IF(RIGHT(A1:A5,1)="*",1,0))

The second one tells me that I get a value of 3 when I check it in the formula wizard, which is correct, but the cell in the spreadsheet gives me the error value "#VALUE!" Any suggestions?

.....Column A
1.......Joe
2.......John*
3.......Steve*
4.......Harry
5.......Paul*
6.......3
 

CodeJockey

Member
May 1, 2001
177
0
0
You can try not using a range:

=SUM(IF(RIGHT(A1,1)="*",1,0),IF(RIGHT(A2,1)="*",1,0),IF(RIGHT(A3,1)="*",1,0),IF(RIGHT(A4,1)="*",1,0),IF(RIGHT(A5,1)="*",1,0))

or, you can place the individual =IF() statements into column B (or anywhere else, like column Z, or even into a different worksheet), to create a list of 0's and 1's, then sum them (the 0's and 1's).

Don't ask me why the formula wizard lets you use a range, but the spreadsheet itself doesn't...different programmers interpretations of the spec., I guess.
 

Rob G.

Senior member
Dec 15, 1999
448
0
0
SUMIF counts the actual value of the cells. To count the number of instances you use COUNTIF.

The problem here is that the asterisk is seen as a wildcard character. Somebody else may know a way of stopping that, but in the meantime consider this:

Change the * character for something else - say a !

Then use:

=COUNTIF(A1:A4,"=*!")

This counts the number of instances of a "!" preceeded by any characters.
 

RayH

Senior member
Jun 30, 2000
963
1
81
You can use an array function.
Type the following formula then use Ctrl-Shift-Enter to enter it:

=SUM(IF(RIGHT(A1:A17,1)="*",1,0))
 

CodeJockey

Member
May 1, 2001
177
0
0
Ray,
Array Formulas = cool. You could have saved me a lot of time over the past few years...why didn't you mention it sooner?

Bestil, looks like that is exactly what you are searching for.
 

RayH

Senior member
Jun 30, 2000
963
1
81


<< RayH: THANK YOU! That is exactly what I was looking for. >>



Glad to help out.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |