Conditionally format: Only if unique identifier and exceeds % of previous record

JJ22

New Member
Joined
Nov 17, 2012
Messages
1
So my problem pretty much is as the title states. I basically want to design a way to test if a patient's value for a parameter is abnormal compared to the rest of their values (previous record, adjacent records, average of all their records). I am not sure on the best method. For example, I might want to be able to flag blood pressures that are 25% greater or smaller than their other records as a way to systematically find which records I need to manually check for validation.

I want to conditionally format cells only if:
A) they have the same unique patient ID (PID) found in the first column
B) The value is 15% or greater than the previous record (or, even better, greater / lower than 15% of adjacent records values, or best, 15% against their average)

Each patient has a record per day of visit. I have sorted by newest date and then PID.

I have already tried this for SBP (you can see my example as green colored)
Format values where this formula is true: =J2/1.15>J3 and Applies to =$J:$J
While this works, for some cells (marked as good), when it is compares records from different people, or worse, blanks, it fails (WRONG).

What is the best way to go about solving this? I already have conditional formatting for extreme highs or lows a column, but nothing to figure out relative to their own records.

Any help would be appreciated. I'm just really tripped up on how to design a formula find "I want to highlight this cell based on this parameter, ONLY IF they have the same record."
PID_VALLNAMEFNAMEDOBKEYAGESEXINSURANCERELATIONSHIPDATESBPDBPHTWTBMISBP
1RichardsonTrent4/17/195161.24MUCAREMarried5/9/2011152.0067.0069.75289.7041.90152.00GOOD
1RichardsonTrent4/17/195161.24MUCAREMarried7/11/2011125.0058.0069.75279.5040.40125.00
1RichardsonTrent4/17/195161.24MUCAREMarried10/14/2011110.0058.0069.75264.5038.04110.00
1RichardsonTrent4/17/195161.24MUCARE PMAPMarried10/14/2011
2JacksonBo6/9/198131.08MHEALTHPARTNERSSingle11/29/2010147.0092.0075.00482.8060.40147.00
3AndersonGary9/11/194764.84MMEDICAMarried1/27/2012141.0083.0069.02235.8034.81141.00
3AndersonGary9/11/194764.84MMEDICAMarried3/9/2012141.0080.0069.02237.0034.98141.00Good
5WozniakSteve11/28/197932.61F3/25/2011120.0068.0065.00202.5033.70120.00
5WozniakSteve11/28/197932.61FMEDICAMarried4/25/2011111.0059.0065.00201.4033.50111.00
6JobsSteve10/18/197833.72F2/1/2011125.0078.0063.00192.0034.00125.00
6JobsSteve10/18/197833.72F2/9/2011152.0067.0069.75289.7041.90152.00
6JobsSteve10/18/197833.72F2/11/2011125.0058.0069.75279.5040.40125.00
6JobsSteve10/18/197833.72F2/16/2011110.0058.0069.75264.5038.04110.00
6JobsSteve10/18/197833.72F3/1/2011112.0074.0063.00189.5033.50112.00
7GatesBill5/15/198428.14MMEDICASingle7/8/2011128.0070.0073.50258.3033.60128.00WRONG
7GatesBill5/15/198428.14MSingle7/13/2011
8BalmerSteve03/31/195953.28M9/17/2010180.00106.0069.00433.5064.10180.00WRONG
8BalmerSteve03/31/195953.28M9/29/2010
8BalmerSteve03/31/195953.28M11/19/2010144.0090.0069.00402.9059.50144.00WRONG
9PetersonAdrian02/03/197636.43F7/6/2012
9PetersonAdrian02/03/197636.43FUCARE PMAPMarried7/25/2012
10StephanoJeffry5/31/197735.10FMEDICAMarried2/9/2011113.0074.00127.20113.00
10StephanoJeffry5/31/197735.10FMEDICAMarried5/18/2011115.0072.00125.80115.00
11FlashForward03/07/196745.35MMEDICADivorced10/18/2010124.0076.0069.50199.5029.00124.00
12NesteaIced12/12/194863.59FMETROPOLITAN HEALTH PLANWidowed5/23/2012111.0056.0060.00167.7032.75111.00WRONG
13MontanaTonya5/5/196844.18FUCAREMarried11/29/2011
13MontanaTonya5/5/196844.18FUCAREMarried12/21/2011
13MontanaTonya5/5/196844.18FUCAREMarried2/22/2012
13MontanaTonya5/5/196844.18FUCAREMarried3/16/2012117.0074.0062.50314.6056.59117.00WRONG
13MontanaTonya5/5/196844.18FUCAREMarried4/26/2012
13MontanaTonya5/5/196844.18FUCAREMarried6/22/2012150.0096.0063.00315.4055.88150.00WRONG
13MontanaTonya5/5/196844.18F8/10/2012
14BoltUsain1/1/198131.51FMEDICA PMAPMarried6/9/2010107.0071.00199.70107.00
14BoltUsain1/1/198131.51FMEDICAMarried1/25/2012116.0071.0060.00207.0040.43116.00WRONG

<tbody>
</tbody>
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,215,110
Messages
6,123,147
Members
449,098
Latest member
Doanvanhieu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top