Thread: If And Help?
View Single Post
  #25   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default If And Help?

Try this formula in cell U2 and copy down.

=IF(OR(MAX(IF((G$2:G$10=G2)*(L$2:L$10=L2)*(M$2:M$1 0=M2)=1,S$2:S$10))S2,SUM((G$2:G2=G2)*(L$2:L2=L2)* (M$2:M2=M2)*(S$2:S2=S2))1),"D","")

This will "D-mark" all but the first of the rows that are identical in
all four columns (G, L, M and S) in addition to the previous criteria.

Hope this helps / Lars-Åke

On Tue, 12 Aug 2008 10:06:54 -0700 (PDT), wrote:

Gentlemen, 1 last question. The formula works GREAT! I can't stress
that enough. It didn't dawn on me until last night: Sometimes we
have instances that there are duplicates (multiple rows) with the same
claim, code, r.code, and paid amount. Right now the formula is
marking all values that meet the criteria (same claim, code, r.code)
that is less than the max amount. That is great :) Is there a way
to also have it mark any others that meet the criteria (same claim,
code, r.cod) that have the same paid amount? So, for instance, below,
I added the last 2 lines just now. I still want it to do what it did
before, but also mark all but one of the max amounts... If not clear,
I have my work around below this. I'm sure I can save some computing
power and time if it can be added into the array. If not, no
biggie :) I appreciate everything you guys have done :)

G L M S U
Claim Code R. Code Paid Reason Code
2308 v7.23 3802 $49.99
2308 v7.23 3802 $29.99 D
2308 v7.23 3802 $33.00 D
2308 v7.23 3802 $49.99 D
2308 v7.23 3802 $49.99 D

My Work Around:
I created 2 more columns, V&W
I entered in the formula you guys created :) as an array, and filled
it all the way down in column V
In column W I did this formula:
=IF(AND(G2=G3,L2=L3,M2=M3,S2=S3),"D","") and filled it all the way
down.
I copy and paste special: values for both column V&W. I autofilter
both individually for blanks, selected visible, deleted blanks.
In column U: =IF(V2&W2="", "", "D") autofilled it down so I know if a
d has been placed in either V or W.

My work around would work, but it is flawed since we have excel 03 vs
the new one, we can only sort by 3 fields and the duplicate (equal)
charge amounts might not always be together as in the example. Yay!