View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
John James
 
Posts: n/a
Default Comparing columns of data


Hi chief775,
I'm bemused how this question relates to the first or what you're
trying to do. Perhaps a new thread with more details so you get a wide
audience?

But I can give an answer to your first question
Is it possible to have the COUNTIF function return 1, instead of a 0
...?
Yes:
--Not()
This formulas surrounding countif (or referenced to a cell containing
the countif formula) will convert false values to true (i.e. 0 or false
to 1) and true values to false (i.e. True or 1 or any non-zero number to
0). The double negative at the start converts the boolean (true/false)
to the number (1/0).

chief775 Wrote:
Thanks, to both Bryan and James, this is very helpful. One additional
question -

Is it possible to have the COUNTIF function return 1, instead of a 0,
to
indicate that the value in the Newlist already exists in the old list.
Then,
instead of changing the formatting have the value which already exists
in the
Oldlist deleted from the Newlist?

For example:

Oldlist Newlist
1 3
2 4
3 6
4 1

Ideally, after running COUNTIF()

Oldlist Newlist
1
2
3 6
4


I hope that makes sense and thanks for any ideas or help.

Howard

"Bryan Hessey" wrote:


Select column A, Format, Conditional format, Formula is,
=countif(B:B,A1)
then select your cell colour

Select column B, Format, Conditional format, Formula is,
=countif(A:A,B1)
then select your cell colour

--

chief775 Wrote:
Is it possible to compare two columns of data in Excel. For

example if
I
have two columns of names A & B, with column A containing 5,000

names
and
column B containing 1,000 names, how would I compare B to A.
Additionally,
would it be possible to then conditionally format the duplicated

item
in
Column B, maybe make it bold or red?

Thanks

Howard



--
Bryan Hessey

------------------------------------------------------------------------
Bryan Hessey's Profile:

http://www.excelforum.com/member.php...o&userid=21059
View this thread:

http://www.excelforum.com/showthread...hreadid=531738




--
John James
------------------------------------------------------------------------
John James's Profile: http://www.excelforum.com/member.php...o&userid=32690
View this thread: http://www.excelforum.com/showthread...hreadid=531738