Nested IF equation help?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

dropsofmusic

Thread Starter
Joined
Sep 7, 2012
Messages
6
Hello all you people who know what I'd love to know about excel but don't!

I'm a medical student trying to handle a massive excel database and am way out of my depth. I've just spent the last few hours trying to work some nested IF equations and I'm just not there.

If anyone could help I would hugely appreciate it!

I've essentially got four columns which refer to one individual person

Example

Column A is heart attack (1 = yes)
Column B is age at heart attack (e.g. 56)
Column C is stroke (1=yes)
Column D is age at stroke (e.g. 54)

Basically, I want to Column E to contain information (1=positive result, 0=negative result) on whether that individual had premature cardiovascular disease (heart attack before 55 or stroke before 55).

Some people have had either a heart attack or stroke which means that at any one time column A or C could express a blank value. I need to incorporate something into the formula which controls for this but have so far failed!

Any ideas?
 

dropsofmusic

Thread Starter
Joined
Sep 7, 2012
Messages
6
Wow,

After three hours of plugging I finally ask for help then I think I manage to work it out??

=IF(A1>0,B1<55,IF(C1>0,D1<55))

expresses a true or false result based on whether or not either age of heart attack OR stroke was <55.

I think this is the right formula but if anyone sees something in this that I'm missing let me know - my brain has become a bit boggled with this all!
 
Joined
Jun 8, 2001
Messages
2,583
Way to Go and figure it out! I improved a little bit on this. With this statement
=IF(AND(A1>0,B1<55),"HT or Stroke",IF(AND(C1>0,D1<55),"Stroke","Neither"))

I would like it to select HT if Stroke is false, and Both if appropriate, but like you...my brain gets boggled.

I have to say Excel is not a database. People try to use it as such but its simply a list, with Excel providing tools to manipulate.:rolleyes: If you want a database import/link to access. Excel is well suited for calculation but falls short for programming (which you are on the verge of doing).
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top