| View previous topic :: View next topic |
| Author |
Message |
Valacapt General User

Joined: 29 Oct 2011 Posts: 14 Location: Seattle, WA
|
Posted: Sat Apr 28, 2012 9:51 am Post subject: [SOLVED] Separating the parts of a blood pressure notation |
|
|
Average blood pressure is usually written as 120/80, which are the upper (systolic) and lower (diastolic) pressures. For statistical use the Mean Arterial Pressure is used. In order to compute that, the systolic and diastolic numbers have to be extracted from the notation. (For info: The computation is: Systolic + [2* Diastolic])/3, which I can do, of course, once I have the two quantities.)
In the future I am going to use a separate column for each, but I have years of spreadsheets where the systolic/diastolic format is used. Is there a function I can use to do to get the two numbers as separate: systolic and diastolic so that I can get out of having to compute the MAP manually?
Last edited by Valacapt on Sat Apr 28, 2012 11:06 am; edited 1 time in total |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Sat Apr 28, 2012 10:09 am Post subject: |
|
|
X1 =FIND("/";A1) gets the position of the slash in A1.
Y1 =VALUE(LEFT(A1;X1-1)) gets the text before that position and converts the text to a numeric value.
Z1 =VALUE(MID(A1;X1+1;LEN(A1))) gets the text behind that position and converts the text to a numeric value. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
Valacapt General User

Joined: 29 Oct 2011 Posts: 14 Location: Seattle, WA
|
Posted: Sat Apr 28, 2012 11:09 am Post subject: |
|
|
| Villeroy wrote: | X1 =FIND("/";A1) gets the position of the slash in A1.
Y1 =VALUE(LEFT(A1;X1-1)) gets the text before that position and converts the text to a numeric value.
Z1 =VALUE(MID(A1;X1+1;LEN(A1))) gets the text behind that position and converts the text to a numeric value. |
Works like a charm. Really do plan to take the time to learn this stuff, but your quick help in this urgent need was a life-saver. Live long and prosper. |
|
| Back to top |
|
 |
|