Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default counting spercific charaters in selected cells

I have a worksheet which contains a number of pupils results with gaps
inbetween then. I want to put a formula at the end of each row to calculate
how many people have A*-C grade.

However I can only seem to do this for a selected range instead of choosing
the spercific cells I want to include. This is a copy of the formula I have
for the entire range;
{=SUM(IF((A1:J1="A*")+(A1:J1="A")+(A1:J1="B")+(A1: J1="C"), 1, 0))}

However, as I said I need it to apply to just cells A1,C1,E1. I have tried
entering this as a comma seperated list eg, (A1,C1,E1="A*). However this
doesn't work as it claims there is a value error (Like everything that goes
wrong on Excel)

Any ideas? I have put the correct syntax and the array is in the correct
place. I have many otherworksheets with this formula working through an
entire range but this one is different as I need it through specified cells.

Cheers

Tom
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default counting spercific charaters in selected cells

On Mon, 9 Jun 2008 07:14:03 -0700, Tom5 wrote:

I have a worksheet which contains a number of pupils results with gaps
inbetween then. I want to put a formula at the end of each row to calculate
how many people have A*-C grade.

However I can only seem to do this for a selected range instead of choosing
the spercific cells I want to include. This is a copy of the formula I have
for the entire range;
{=SUM(IF((A1:J1="A*")+(A1:J1="A")+(A1:J1="B")+(A1 :J1="C"), 1, 0))}

However, as I said I need it to apply to just cells A1,C1,E1. I have tried
entering this as a comma seperated list eg, (A1,C1,E1="A*). However this
doesn't work as it claims there is a value error (Like everything that goes
wrong on Excel)

Any ideas? I have put the correct syntax and the array is in the correct
place. I have many otherworksheets with this formula working through an
entire range but this one is different as I need it through specified cells.

Cheers

Tom


Here's one way:


=SUMPRODUCT((A1={"A*";"A";"B";"C"})+(C1={"A*";"A"; "B";"C"})+(E1={"A*";"A";"B";"C"}))

Of course, I would enter the grades you are searching for into a Named range,
and then use this simpler appearing (and editable) formula:

=SUMPRODUCT((A1=Grades)+(C1=Grades)+(E1=Grades))

Make sure there are no blank cells in the named range "Grades"
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMMING TOTALS BASING ON CHARATERS ENTERED IN CELLS OF ONE COLUMN Lawsim Excel Worksheet Functions 2 May 23rd 11 05:21 PM
SUMMING TOTAL BASED ON CHARATERS ENTERED IN CELLS Lawsim Excel Worksheet Functions 0 May 23rd 11 12:47 PM
Multiple cells or columns are selected instead of selected cell or Mikey Excel Discussion (Misc queries) 1 April 29th 09 09:48 PM
Counting Charaters Coccoleggs Excel Worksheet Functions 8 September 21st 07 05:06 PM
Macro to take selected cells times a selected cell Craig Excel Programming 4 October 24th 05 12:54 AM


All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"