View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Excel - Match positive and negative numbers

Do it with conditional formatting.

Select all target cells starting at A1

menu FormatConditional Formatting
change Condition 1 To Formula Is
enter a formula of =COUNTIF(A:A,-A1)=0
select the pattern tab
choose a colour
OK out

--
__________________________________
HTH

Bob

"Stuart" wrote in message
...
Hello

I hope someone can assist me on this one.

I was hoping it would be fairly easy for someone to write a macro
which can look down a column U and find a positive number and then
match this against a negative number of the same amount.

Basically there should always be a positive and negative number.
Where there is a match with say 34.28 and -34.28 then both rows should
be highlighted.

I want to basically find the rows where there is only either a
positive number or a negative number with no match to the other side.

There may well be two rows containing 34.28 and only one containing
-34.28. I dont know how you can factor this in to the equation.

Sorry if this is a rather complex bit of code.......

Stuart