Thread: If And Help?
View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_1095_] Rick Rothstein \(MVP - VB\)[_1095_] is offline
external usenet poster
 
Posts: 1
Default If And Help?

For Row 4, are you saying that a "unique" row (Claim, Code and R.Code match
no other rows) should not get flagged with a "D"? I figured a "unique" row,
by definition, contains the lowest Paid price and should, therefore, be
flagged with a "D"... is this not correct?

I disagree with you on Rows 5 and 8. For Row 5, the Claim Number **IS** the
same (I see 2917 for each of the last 3 rows in your example) and since it
is, it should get the D and not Row 8.

Rick


wrote in message
...
Rick, the array you gave me is close, very close. When I entered it
in, these are the results I received:

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 3809 $33.00 D
2816 v7.23 3809 $96.00 D
2917 v8.07 5039 $57.35 D
2917 v8.07 5039 $93.18
2917 v8.07 5039 $63.07

Row 4 shouldn't have been flagged since R. Code is different from the
previous 2 (3809 instead of 3802).
Row 5 shouldn't have been flagged since Claim Number is different than
others, not a duplicate.
Row 8 should have been flagged since claim number, code, and R. Code
are all the same and value is less than the $93.18.

Lars:

Your formula results in the below:
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 3809 $33.00
2816 v7.23 3809 $96.00
2917 v8.07 5039 $57.35 D
2917 v8.07 5039 $93.18
2917 v8.07 5039 $63.07

You guys sure have put me in the ballpark. I can do formulas, nothing
as complex, or as good as you two. You guys have gotten me a heck of
a lot closer than I ever would have. I'm going to try to look at your
arrays and see if I can add too it (I'ld say slim and none are my
chances of figure it out, but going to give it a shot :) If you guys
have any other ideas, they are greatly appreciated!

Thanks,

Joe


The one thing I noticed is this:
On Aug 9, 12:26 pm, "Rick Rothstein \(MVP - VB\)"
wrote:
This array-entered** formula should do will do what you want (and it will
work correctly evenifthe data is not sorted)...

=IF(MIN(IF((G$2<"")*(G$2:G$10000=G2)*(L$2:L$10000 =L2)*(M$2:M$10000=M2)=1,S$2:S$10000,""))=S2,"D","" )

** commit the formula using Ctrl+Shift+Enter, not just Enter by itself

The formula assumes your first data row is Row 2, place the formula in U2
and copy down. I set the formula to work with data down to Row 10000
maximum, butifyou know there is a maximum row less than 10000 below which
there will never be data, you make the formula more efficient by changing
the references with 10000 to that lower maximum row number.

Rick

wrote in message

...



I redited since it messed up chart. You don't have to worry about T,
in this particular problem.


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 3809 $33.00
2816 v7.23 3809 $96.00
2917 v8.07 5039 $57.35 D
2917 v8.07 5039 $93.18
2917 v8.07 5039 $63.07 D