View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David McRitchie[_2_] David McRitchie[_2_] is offline
external usenet poster
 
Posts: 134
Default Highlight the debit and Credit ( positive and negative) numbers within a column

Hi Sandip,
Duplicates was not mentioned in your original questions about
identifying negative numbers. Don't know if these are to be tied
in together. The cells you select when you define a C.F. are the
ones that get colored. In the formula below since $A is
absolute you can select any column(s) you want and not necessarily
the column where the duplicate occurs.

Directly from my page on Conditional Formatting:
http://www.mvps.org/dmcritchie/excel/condfmt.htm


Duplicated Anywhere in Column: Need not be sorted (includes first of duplicates)
Formula is: =COUNTIF($A:$A,$A1)1

For Conditional Formatting the object of the formula is to return True or False.
False is zero, everything else is True.

So your problem is really on the formula. You can read more about
identification of duplicates on Chip Pearson's pages look for
duplicates in his topic index.
http://www.cpearson.com/excel/topic.htm
and more about use of COUNTIF in
Cell Counting Techniques -- John Walkenbach
- Worksheet formula examples that demonstrate various
- ways to count cells that match a criteria.
http://www.j-walk.com/ss/excel/tips/tip52.htm

A reference to download and refer to on your computer
Excel Function Dictionary -- by Peter Noneley,
http://homepage.ntlworld.com/noneley
workbook with 157+ sheets, each with an explanation and
example of an Excel function.

Looks like you are looking for outstanding balances, so you might
want to use AutoFilter where SUMIF on a helper column is not
zero for a specific description/account. Use of autofilter in
Debra Dalgleish's http://www.contextures.com
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Sandip Shah" wrote...

I have gone through the website on conditional formatting. I had also
gone through CPearsons website prior to posting this message. The
problem I see in conditional formatting is that it highlights the
duplicate entry but not the original entry.

For eg. If I have 4500 on row 1 and -4500 on row 12, I would want both
these numbers to be highlighted so that I can verify it and remove it
from the list. Hence in a column which has hundreds of positive and
negative numbers, the end result of all the highlighted numbers would
be zero since the positive is matched with a negative number.

Let me know if I am wrong in my understanding about conditional
formatting.


"David McRitchie" wrote
When you indicate highlight do you really need the background
to be highlighted, if so then the Conditional Formatting solutions
already provided simplify this.
http://www.mvps.org/dmcritchie/excel/condfmt.htm