Formula Help

P

Pat

I've posted this and had several replies but none have worked as yet. Let me
give more detail.

I am trying to evaluate several criteria to ultimately end up with either a
0 or a 1 in the fields with the formula.

The first argument is to determine if the previous row has already reported
an issue for this patient (I'm a nurse and trying to create a worksheet that
calculates number of patients with wounds as well as the number of wounds.
Since a patient may have more than one wound, I need to make sure a patient
with more than one wound is only counted once (for that wound type).

So to achieve this I need to look to see if the room number (what I set-up
for this sheet) appears in the previous row and if it does, is the value for
that cell 0 or 1. If the value is a one, it would not count the patient (0
in the current cell) for that type of wound again.

Speaking of that type of wound again, this is established with three
additional arguments where I'm looking up data on another worksheet.

The formula I'm currently using is as follows:

=(IF($A$10=$A$6,IF(B6="1",0),IF('Skin Alterations'!$D$9="PU",IF('Skin
Alterations'!$E$9="A",IF('Skin Alterations'!$G9="I",1,0),0),0)))

The problem is that if the data in the previous row is 1 it works okay,
however if the data in the previous row is 0 it returns "False" instead of 1
which it should do if all other criteria match.

So If A10=A6 and B6=1 then current cell would equal 0

But if A10=A6 and B6=0 and D9=PU and E9=A and G9=I then current cell should
equal 1

Sorry for the long story, but figured a better description might help.

Thanks for any assistance you can offer.
 
J

Jacob Skaria

The below formula works as you specified ..Try and feedback
So If A10=A6 and B6=1 then current cell would equal 0
But if A10=A6 and B6=0 and D9=PU and E9=A and G9=I then current cell should
equal 1

=IF(AND($A$10<>"",$A$10=$A$6),
IF(B6=1,0,
IF(AND('Skin Alterations'!$D$9="PU",'Skin Alterations'!$E$9="A",'Skin
Alterations'!$G9="I"),1,0)))
 
C

Crew

Try This

=IF(AND(A10=A6,B6=0,D9="PU",E9="A",G9="I"),1,0)

I haven't made the cell reference Absolute ($ signs) but you can do this if
you have to, just place your cursor over part of the cell address and hit
your F4 key until the cell address includes the two $ signs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top