View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 293
Default Excel - Match positive and negative numbers

Hi Stuart,

That is a quite different problem. It also raise other issues. How would you propose to treat:
.. two debits of the same amount, where there is only one credit of the same amount (ie only one debit has been paid off)
.. payment of an amount by instalments
.. payment of two or more debts in a single payment?

--
Cheers
macropod
[MVP - Microsoft Word]


"Stuart" wrote in message ...
I am sorry everyone.....maybe I am not explaining correctly.

I have an account in which it has been debited with a positive number
£34.28.

I might later pay this in which case I would have a negative figure of
-£34.28.

I need the row containing the £34.28 and -£34.28 to be formatted in
green if there is a match.

If there is only the £34.28 then this will remain unhighlighted.

I hope your able to assist me on this.

Stuart



On Feb 26, 11:14 am, "Bob Phillips" wrote:
In B1: =ABS(A1)

copy down then sort by column B

--
__________________________________
HTH

Bob

"Stuart" wrote in message

...
Hi

Thanks for your responses

There are several hundred rows.

The £34.28 could be matching the -£34.28 on the 500th row. The rows
are not in positive and negative order.

They come in any order.

I want to find pairs in the rows.

Does this make sense?

I am sure someone put together a macro a while back but cannot find
the thread.

Sorry to be a pain.

Stuart

They are not in any particular order.

On Feb 26, 10:04 am, "macropod" wrote:



Hi Stuart,


You don't really need a macro if all you want is for the non-matching cell
pairs to be highlighted - all you need is a conditional
format based in the equation:
=$A1+$B1<0
where A1 & B1 represent the addresses of the cell pair being tested.
Simply enter this formula in the conditional format for the
first to be tested, using the 'Formula is' option from the conditions
dropdown and choose an appropriate pattern highlighting
format, then copy this cell and paste over the whole range using
Edit|Paste Special|Format.


--
Cheers
macropod
[MVP - Microsoft Word]


"Stuart" wrote in
...
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- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -