Dangerous yoga poses

The Society for Extreme Yoga (SEY) has gathered data about extreme yoga poses from around the world. For each pose, they have recorded:

  • The name of the pose, e.g., the rightward hog.
  • The percentage of deaths each time the pose is used, e.g., 0.01%.
  • The percentage of serious injuries each time the pose is used, e.g., 0.01%.

So, if you do the rightward hog, there is one chance in 10,000 that you will die, and one chance in 10,000 that you will be injured (only injuries that require hospitalization count). That makes rightward hog a safe pose. Some are more dangerous. For example, if you do the downward mouse, there is more than one chance in 1,000 that you will die or be seriously injured. Since thousands of extreme yogists do the downward mouse and other dangerous poses every day, there are hundreds of deaths every year.

Write a VBA program that identifies dangerous poses, and shows the most and least dangerous poses, along with other data. The worksheet starts like this:

Start

The pose data starts in row 2, with one line for each pose. Your program can't rely on a particular number of poses, as new poses are being discovered.

You can download the starting workbook.

After you run your program, you should see something like this:

Done

  • Write the code so that it works no matter how many poses there are. The last pose has a blank row after it.
  • Highlight dangerous poses in yellow. The danger rating of a pose is death% * 2 + injury%. A pose is dangerous if the rating is 0.12% or more. If a pose is not dangerous, then it is considered safe.
  • Show the total number of poses.
  • Show the number of safe poses, the name of the safest pose, and its danger rating. If there is a tie in danger ratings, it doesn't matter which pose you show.
  • Do the same for dangerous poses.
  • You can assume all of the data is valid.
  • You don't need to use subs for this program, if you prefer not to.

Upload your completed workbook.

(If you were logged in as a student, you could submit an exercise solution, and get some feedback.)

Referenced in: 
Attachments: