+ Reply to Thread
Results 1 to 12 of 12

Blood Pressure Formula

  1. #1
    Registered User
    Join Date
    12-12-2018
    Location
    USA
    MS-Off Ver
    2013 (15.0.5085.1000) 32-Bit (Professional Plus 2013)
    Posts
    8

    Question Blood Pressure Formula

    Can someone please help me with my formula? You can see logic in the diagram image I included in the XLSX, but my formula in E2 doesn't seem to work properly. Thanks for the help.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,015

    Re: Blood Pressure Formula

    Try this:

    =IF(AND(C2<120,D2<80),"normal",IF(AND(C2>119,C2<130,D2<80),"elevated",IF(OR(AND(C2>129,C2<140),AND(D2>79,D2<90)),"High blood pressure Stage 1",IF(OR(AND(C2>139,C2<181),AND(D2>89,D2<120)),"High blood pressure Stage 2",IF(OR(C2>179,D2>119),"Hypertensive Crisis","MISSING_VALUE")))))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-12-2018
    Location
    USA
    MS-Off Ver
    2013 (15.0.5085.1000) 32-Bit (Professional Plus 2013)
    Posts
    8

    Re: Blood Pressure Formula

    For example, if I set the SYS to 139 and DIA to 119, it shouldn't be Stage 1, it should be Stage 2 since the DIA is higher than 90 (but less than 120).

  4. #4
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Blood Pressure Formula

    Try this:
    =IF(OR(AND(C2>129,C2<140),AND(D2>79,D2<90)),"High BP Stage1",IF(OR(C2>139,D2>89),"High BP Stage2",IF(OR(C2>179,D2>119),"Hytertensive Crisis",IF(AND(C2<120,D2<80),"Normal",IF(AND(AND(C2>119,C2<130),D2>79,D2<80),"Elevated")))))


    Bharath

  5. #5
    Registered User
    Join Date
    12-12-2018
    Location
    USA
    MS-Off Ver
    2013 (15.0.5085.1000) 32-Bit (Professional Plus 2013)
    Posts
    8

    Re: Blood Pressure Formula

    Quote Originally Posted by bsrivatsa View Post
    Try this:
    =IF(OR(AND(C2>129,C2<140),AND(D2>79,D2<90)),"High BP Stage1",IF(OR(C2>139,D2>89),"High BP Stage2",IF(OR(C2>179,D2>119),"Hytertensive Crisis",IF(AND(C2<120,D2<80),"Normal",IF(AND(AND(C2>119,C2<130),D2>79,D2<80),"Elevated")))))


    Bharath
    If I do 120 SYS and 79 DIA, I get FALSE. I think I would need to remove "D2>79," to fix that issue.
    =IF(OR(AND(C2>129,C2<140),AND(D2>79,D2<90)),"High BP Stage1",IF(OR(C2>139,D2>89),"High BP Stage2",IF(OR(C2>179,D2>119),"Hytertensive Crisis",IF(AND(C2<120,D2<80),"Normal",IF(AND(AND(C2>119,C2<130),D2<80),"Elevated")))))

    However, if it is then set to 130 SYS and 90 DIA, it does not read Stage 2 and instead reads Stage 1. In other words, it should always take the more severe stage.

  6. #6
    Registered User
    Join Date
    12-12-2018
    Location
    USA
    MS-Off Ver
    2013 (15.0.5085.1000) 32-Bit (Professional Plus 2013)
    Posts
    8

    Unhappy Re: Blood Pressure Formula

    No one???? :-(

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,015

    Re: Blood Pressure Formula

    Patience, please.

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Blood Pressure Formula

    Please try

    =INDEX({"normal";"elevated";"High blood pressure Stage 1";"High blood pressure Stage 2";"Hypertensive Crisis"},MAX(MATCH(C2,{0,120,130,140,180}),MATCH(D2,{0,80,80,90,120})))
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Blood Pressure Formula

    Quote Originally Posted by excel_Noob1234 View Post
    If I do 120 SYS and 79 DIA, I get FALSE. I think I would need to remove "D2>79," to fix that issue.
    =IF(OR(AND(C2>129,C2<140),AND(D2>79,D2<90)),"High BP Stage1",IF(OR(C2>139,D2>89),"High BP Stage2",IF(OR(C2>179,D2>119),"Hytertensive Crisis",IF(AND(C2<120,D2<80),"Normal",IF(AND(AND(C2>119,C2<130),D2<80),"Elevated")))))

    However, if it is then set to 130 SYS and 90 DIA, it does not read Stage 2 and instead reads Stage 1. In other words, it should always take the more severe stage.
    Ok, try this-

    =IF(OR(C2="",D2=""),"Enter Value",IF(AND(C2<>"",D2<>"",C2<120,D2<80),"Normal",IF(AND(AND(C2>119,C2<130),D2<80),"Elevated",IF(AND(AND(C2>129,C2<140),D2<89),"High BP stage 1",IF(AND(AND(D2>79,D2<90),C2<140),"High BP stage 1",IF(AND(AND(C2>139, C2<180),D2<120),"High BP stage 2",IF(AND(AND(D2>89,D2<120),C2<180),"High BP Stage 2",IF(AND(C2>180,D2>0),"Hypertensive crisis",IF(AND(D2>120,C2>0),"Hypertensive crisis")))))))))


    Bharath

  10. #10
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Blood Pressure Formula

    Quote Originally Posted by Bo_Ry View Post
    Please try

    =INDEX({"normal";"elevated";"High blood pressure Stage 1";"High blood pressure Stage 2";"Hypertensive Crisis"},MAX(MATCH(C2,{0,120,130,140,180}),MATCH(D2,{0,80,80,90,120})))
    Amazing. This is so elegant!

  11. #11
    Registered User
    Join Date
    12-12-2018
    Location
    USA
    MS-Off Ver
    2013 (15.0.5085.1000) 32-Bit (Professional Plus 2013)
    Posts
    8

    Re: Blood Pressure Formula

    That did the trick! Nice! Thank you.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,015

    Re: Blood Pressure Formula

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 17
    Last Post: 02-14-2023, 12:24 AM
  2. [SOLVED] Hello. blood pressure based on various age groups
    By mrjinx007 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-10-2012, 03:24 PM
  3. [SOLVED] How do you get more chart days on Blood pressure tracker
    By Matthew in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-19-2006, 04:20 PM
  4. Get aveages for last few days:blood pressure
    By N Harkawat in forum Excel Formulas & Functions
    Replies: 45
    Last Post: 09-06-2005, 04:05 AM
  5. Blood Pressure Chats in Excell
    By Gwen in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-09-2005, 04:05 AM
  6. [SOLVED] Calculate change in blood pressure
    By BRIAN LEE via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-10-2005, 03:06 PM
  7. blood pressure charting
    By MIke in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 02-15-2005, 12:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1