Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / August 2007

Tip: Looking for answers? Try searching our database.

find all key-value pairs if there is key with different value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kang - 27 Aug 2007 05:17 GMT
I want to find all key-value pairs if there is key with different value.
in the case above
A   1
A   1
B   2
B   2
B   3
C   2
C   4
the first
A   1 : should not be formatted because all the values with A key are 1.
A   1 : should not be formatted with the same reason above
B   2 : should be formatted because the values for the Key B is not
uniformly equal
B   2 : should be formatted because the values for the Key B is not
uniformly equal even though there exists the same value with the same key
B   3 : should be formatted because the values for the Key B is not
uniformly equal
C   2 : should be formatted because the values for the Key C is not
uniformly equal
C   4 : should be formatted because the values for the Key C is not
uniformly equal

the format formular is
=SUMPRODUCT(($A$1:$A$10=$A1)*($B$1:$B$10=$B1)*($A$1:$A$10<>"")*($B$1:$B$10<>""))=1
Dave Peterson - 27 Aug 2007 13:01 GMT
I think this does what you want.

Select the range you want to give that format|Conditional format.  With A1 the
activecell, use this formula:

=COUNTIF($A$1:$A$10,A1)=SUMPRODUCT(--($A$1:$A$10=A1),--($B$1:$B$10=B1))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers.  The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

> I want to find all key-value pairs if there is key with different value.
> in the case above
[quoted text clipped - 21 lines]
> the format formular is
> =SUMPRODUCT(($A$1:$A$10=$A1)*($B$1:$B$10=$B1)*($A$1:$A$10<>"")*($B$1:$B$10<>""))=1

Signature

Dave Peterson

Dave Peterson - 27 Aug 2007 13:24 GMT
I see you have an active thread in .newusers.

I'll bow out of this thread.

> I think this does what you want.
>
[quoted text clipped - 43 lines]
>
> Dave Peterson

Signature

Dave Peterson

Max - 28 Aug 2007 00:06 GMT
>I see you have an active thread in .newusers.
>
> I'll bow out of this thread.

Dave, don't <g>. Think I've run dry of ideas for the OP over in .newusers
(in his repeat posting).
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

Dave Peterson - 28 Aug 2007 02:14 GMT
I really hate wasting my time on multiposted messages.

Most of the time, similar suggestions are posted and it's just a waste for both
the responder and the OP.

> >I see you have an active thread in .newusers.
> >
[quoted text clipped - 8 lines]
> xdemechanik
> ---

Signature

Dave Peterson


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.