View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_] Ashish Mathur[_2_] is offline
external usenet poster
 
Posts: 1,766
Default Check if Duplicate with Exceptions

Hi,

Try this

=if(isnumber(1*C7),if(and(countif(C$7:C799,C7)1,s umproduct($Z$7$:$Z799="Bank
- Cheque")*($A$7$:$A799=$A7)<=1),"Duplicate",""),"")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"mjones" wrote in message
...
Hi All,

Here's a tricky formula that I can't even guess at. I need to return
false or something similar to identify any duplicate value in the
range C7:C799.

Usually the values are numbers, but there are many blanks and a few
XXXX values. The range C7:C799 is formatted as text.

There are 3 exceptions that are allowed (i.e. don't return false):

1 - XXXX values can be duplicated

2 - Blanks can be duplicated

3 - If Z7:Z799 in the same row as the C column numbers both (or all)
have the value 'Bank - Cheque' and date in A7:A799 is the same for
both (or all) duplicate numbers, that's okay too. Dates are formatted
as Date 17-Jan-10.

Thanks for any help and have a great day!

Michele