Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
IanEmery
 
Posts: n/a
Default Conditional Identifiaction Of Unique Entries


Hi

I formula that identifies unique entries in a column and counts the
total as shown below:

=SUMPRODUCT(B8:B501<"")/(COUNTIF(B8:B501,B8:B501&"")))

I am trying to get this formula to work only where a precondition
exists, i.e. that an associated field is set to "yes"

This works fine on normal SUMIF functions as shown below:

=SUMIF(S8:S501,"Yes",P8:P525)

However when I try o combine the 2 scenarious I receive a Value#
error.

The formula I am trying is shown below:

=IF(S8:S501,"Yes",SUMPRODUCT(B8:B501<"")/(COUNTIF(B8:B501,B8:B501&"")))

Anyone any ideas?

Many thanks


--
IanEmery
------------------------------------------------------------------------
IanEmery's Profile: http://www.excelforum.com/member.php...o&userid=35714
View this thread: http://www.excelforum.com/showthread...hreadid=554978

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Conditional Identifiaction Of Unique Entries


Not sure if this is exactly what you want because your SUMIF refers to
P8:P501 and your SUMPRODUCT does not but this might get you there,


=SUMPRODUCT(--(S8:S501="Yes"),--(B8:B501<""),P8:P501)/COUNTIF(B8:B501,B8:B501&"")




HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=554978

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
IanEmery
 
Posts: n/a
Default Conditional Identifiaction Of Unique Entries


Hi Steve

Thanks for your reply

I have changed the formula to reflect the correct field references aas
shown below but receive a #DIV/0! error:

=SUMPRODUCT(--(S8:S501="Yes"),--(A8:A501<""),A8:A501)/COUNTIF(A8:A501,A8:A501&"")

Can you see any problems ?

Thanks


--
IanEmery
------------------------------------------------------------------------
IanEmery's Profile: http://www.excelforum.com/member.php...o&userid=35714
View this thread: http://www.excelforum.com/showthread...hreadid=554978

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Marcelo
 
Posts: n/a
Default Conditional Identifiaction Of Unique Entries

=SUMPRODUCT(--(S8:S501="Yes"),--(A8:A501<""),(A8:A501))/COUNTIF(A8:A501,A8:A501&"")

It's work here, if you can send a sample of the type of data you have in
column A and S

HTH
Regards from Brazil
Marcelo

"IanEmery" escreveu:


Hi Steve

Thanks for your reply

I have changed the formula to reflect the correct field references aas
shown below but receive a #DIV/0! error:

=SUMPRODUCT(--(S8:S501="Yes"),--(A8:A501<""),A8:A501)/COUNTIF(A8:A501,A8:A501&"")

Can you see any problems ?

Thanks


--
IanEmery
------------------------------------------------------------------------
IanEmery's Profile: http://www.excelforum.com/member.php...o&userid=35714
View this thread: http://www.excelforum.com/showthread...hreadid=554978


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Conditional Identifiaction Of Unique Entries


Ian,

I think this is what you are looking for.

=SUMPRODUCT(--(S8:S501="Yes"),--(A8:A501<""),A8:A501)/SUMPRODUCT((A8:A501<"")/COUNTIF(A8:A501,A8:A501&""))

This will sum A8:A501 IF S8:S501 = "Yes" AND IF A8:A501 is not blank
and divide by the number of unique values excluding blanks in A8:A501.

Does that work for you?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=554978



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
IanEmery
 
Posts: n/a
Default Conditional Identifiaction Of Unique Entries


Thanks for the formula.

This is returning a count of 0 with the following data extract:

Range A8:A501 contain numbers of which are shown below:

A8:1
A9:1
A10:2
A11:2
A12:1
A13:3
A14:4

Range S8:S501 contains a formula which dreives a Yes or Null value as
shown below:

S8:
S9:Yes
S10:Yes
S11:Yes
S12:
S13:Yes
S14:

As such the count should return a result of 3

The formula to derive the Yes value is shown below for information:

=IF(R9 $H$2,"Yes",IF(M9 R9, "Yes", ""))

Any further assistance would be much appreciated


--
IanEmery
------------------------------------------------------------------------
IanEmery's Profile: http://www.excelforum.com/member.php...o&userid=35714
View this thread: http://www.excelforum.com/showthread...hreadid=554978

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
Best way to get a list of unique entries in a field [email protected] Excel Worksheet Functions 2 January 19th 06 10:30 PM
Pivot Tables Sum of Unique Text Entries Jen Excel Worksheet Functions 0 January 4th 06 07:25 PM
Extracting unique entries and assigning it to a named range Hari Excel Discussion (Misc queries) 0 December 13th 05 06:29 AM
counting unique entries in a list Michael Excel Discussion (Misc queries) 1 November 10th 05 03:00 PM
how do i see more than first 1000 unique entries filters dropdow.. Diana Setting up and Configuration of Excel 2 December 22nd 04 09:41 PM


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

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

About Us

"It's about Microsoft Excel"