Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default Counting text using different criteria & resulting in different va

Hi,
I need to find and count certain words in a column and for each word have a
different value and then add those values?
EG
=SUM((IF(Addresses!C:D="M Prawn",1)),(IF(Addresses!C:D="1/2 Prawn",0.5)))

Is this possible? I need any cell in the range containing "M Prawn" to be
worth 1 and any cell containing "1/2 Prawn" to be worth 0.5. Therefore if
there is 1 cell of each the result would be 1.5.

Also I don't want to actually have the "M Prawn" or "1/2 Prawn" in the
formula. I want to have a cell reference to a separate cell that contains the
words "M Prawn" etc.
EG
=SUM((IF(Addresses!C:D=A5,1)),(IF(Addresses!C:D=A6 ,0.5)))

What am I doing wrong or is there a better way?

Thanks in advance
Rachel


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting text using different criteria & resulting in different va

Try this...

A1 = M Prawn
A2 = 1/2 Prawn

=COUNTIF(Addresses!C:D,A1)+COUNTIF(Addresses!C:D,A 2)/2

--
Biff
Microsoft Excel MVP


"Rachel" wrote in message
...
Hi,
I need to find and count certain words in a column and for each word have
a
different value and then add those values?
EG
=SUM((IF(Addresses!C:D="M Prawn",1)),(IF(Addresses!C:D="1/2 Prawn",0.5)))

Is this possible? I need any cell in the range containing "M Prawn" to be
worth 1 and any cell containing "1/2 Prawn" to be worth 0.5. Therefore if
there is 1 cell of each the result would be 1.5.

Also I don't want to actually have the "M Prawn" or "1/2 Prawn" in the
formula. I want to have a cell reference to a separate cell that contains
the
words "M Prawn" etc.
EG
=SUM((IF(Addresses!C:D=A5,1)),(IF(Addresses!C:D=A6 ,0.5)))

What am I doing wrong or is there a better way?

Thanks in advance
Rachel




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Counting text using different criteria & resulting in different va

Hi,

Try this

=SUMPRODUCT((Addresses!C:D=A5)+0.5*(Addresses!C:D= A6))


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Rachel" wrote:

Hi,
I need to find and count certain words in a column and for each word have a
different value and then add those values?
EG
=SUM((IF(Addresses!C:D="M Prawn",1)),(IF(Addresses!C:D="1/2 Prawn",0.5)))

Is this possible? I need any cell in the range containing "M Prawn" to be
worth 1 and any cell containing "1/2 Prawn" to be worth 0.5. Therefore if
there is 1 cell of each the result would be 1.5.

Also I don't want to actually have the "M Prawn" or "1/2 Prawn" in the
formula. I want to have a cell reference to a separate cell that contains the
words "M Prawn" etc.
EG
=SUM((IF(Addresses!C:D=A5,1)),(IF(Addresses!C:D=A6 ,0.5)))

What am I doing wrong or is there a better way?

Thanks in advance
Rachel


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default Counting text using different criteria & resulting in differen

Hi there, thanks for your responses. Both suggestions work.
Much appreciated!
Rachel

"Shane Devenshire" wrote:

Hi,

Try this

=SUMPRODUCT((Addresses!C:D=A5)+0.5*(Addresses!C:D= A6))


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Rachel" wrote:

Hi,
I need to find and count certain words in a column and for each word have a
different value and then add those values?
EG
=SUM((IF(Addresses!C:D="M Prawn",1)),(IF(Addresses!C:D="1/2 Prawn",0.5)))

Is this possible? I need any cell in the range containing "M Prawn" to be
worth 1 and any cell containing "1/2 Prawn" to be worth 0.5. Therefore if
there is 1 cell of each the result would be 1.5.

Also I don't want to actually have the "M Prawn" or "1/2 Prawn" in the
formula. I want to have a cell reference to a separate cell that contains the
words "M Prawn" etc.
EG
=SUM((IF(Addresses!C:D=A5,1)),(IF(Addresses!C:D=A6 ,0.5)))

What am I doing wrong or is there a better way?

Thanks in advance
Rachel


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
Counting unique text that meets several criteria blswes Excel Worksheet Functions 10 March 5th 09 08:05 PM
Need help on counting text within certain criteria christinac Excel Worksheet Functions 5 April 27th 06 01:09 PM
How can I fix HYPERLINK(B2,E2) to the resulting text and link? Lisa Excel Discussion (Misc queries) 3 April 3rd 06 09:46 PM
Zeros in text resulting in #div/0! even when using IF function [email protected] Excel Discussion (Misc queries) 10 March 1st 06 01:38 AM
Counting text criteria Belinda Excel Worksheet Functions 1 October 20th 05 10:43 PM


All times are GMT +1. The time now is 07:05 AM.

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"