Formula for calculating ratio

stusam

New Member
Joined
Apr 6, 2022
Messages
8
Office Version
  1. 2019
Platform
  1. Windows
Hi.
I work in education, and I'm currently working on a new way to plan our online courses. Part of this includes ensuring a balance of "Activity types". We have four possible Activity types to choose from:
  • Directed Learning: Activity
  • Directed Learning: Content
  • Directed Learning: Live Session
  • Guided Independent Learning
Using the sheet below, I'm trying to write a formula to calculate the ratio/balance of activity types (Column A) based on their duration (Column B). The snag being, I need durations for all three "Directed Learning" activity types to be grouped together, so that the ratio (column C) shows the balance between Directed Learning to Guided Independent Learning. Is anyone able to help, as I'm absolutely stumped?

! NEW Module Map Template V2.3.xlsx
ABC
1Activity TypeAcrvity Duration (Minutes)Activity Ratio (Directed Learning : Guided Independent Learning)
2Directed Learning: Live Session90
3Directed Learning: Activity10
4Directed Learning: Content20
5Directed Learning: Activity10
6Directed Learning: Activity10
7Directed Learning: Content30
8Guided Independent Learning120
Sheet2
Cells with Data Validation
CellAllowCriteria
A2:A8ListDirected Learning: Activity, Directed Learning: Content, Guided Independent Learning, Directed Learning: Live Session


Thank you.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi.
I work in education, and I'm currently working on a new way to plan our online courses. Part of this includes ensuring a balance of "Activity types". We have four possible Activity types to choose from:
  • Directed Learning: Activity
  • Directed Learning: Content
  • Directed Learning: Live Session
  • Guided Independent Learning
Using the sheet below, I'm trying to write a formula to calculate the ratio/balance of activity types (Column A) based on their duration (Column B). The snag being, I need durations for all three "Directed Learning" activity types to be grouped together, so that the ratio (column C) shows the balance between Directed Learning to Guided Independent Learning. Is anyone able to help, as I'm absolutely stumped?

! NEW Module Map Template V2.3.xlsx
ABC
1Activity TypeAcrvity Duration (Minutes)Activity Ratio (Directed Learning : Guided Independent Learning)
2Directed Learning: Live Session90
3Directed Learning: Activity10
4Directed Learning: Content20
5Directed Learning: Activity10
6Directed Learning: Activity10
7Directed Learning: Content30
8Guided Independent Learning120
Sheet2
Cells with Data Validation
CellAllowCriteria
A2:A8ListDirected Learning: Activity, Directed Learning: Content, Guided Independent Learning, Directed Learning: Live Session


Thank you.
Just to add, it doesn't need to display the balance as a ratio, it could be a presented as a percentage split, or any other way that allows me to see how the activities are weighted throughout the course.
 
Upvote 0
Is this what you mean?

23 01 14.xlsm
ABC
1Activity TypeAcrvity Duration (Minutes)Activity Ratio (Directed Learning : Guided Independent Learning)
2Directed Learning: Live Session9058.62% : 41.38%
3Directed Learning: Activity10
4Directed Learning: Content20
5Directed Learning: Activity10
6Directed Learning: Activity10
7Directed Learning: Content30
8Guided Independent Learning120
Split
Cell Formulas
RangeFormula
C2C2=TEXT(SUMPRODUCT(--(LEFT(A2:A8,1)="D"),B2:B8)/SUM(B2:B8),"0.00%")&" : "&TEXT(1-SUMPRODUCT(--(LEFT(A2:A8,1)="D"),B2:B8)/SUM(B2:B8),"0.00%")
 
Upvote 0
Solution
I think it just might
Is this what you mean?

23 01 14.xlsm
ABC
1Activity TypeAcrvity Duration (Minutes)Activity Ratio (Directed Learning : Guided Independent Learning)
2Directed Learning: Live Session9058.62% : 41.38%
3Directed Learning: Activity10
4Directed Learning: Content20
5Directed Learning: Activity10
6Directed Learning: Activity10
7Directed Learning: Content30
8Guided Independent Learning120
Split
Cell Formulas
RangeFormula
C2C2=TEXT(SUMPRODUCT(--(LEFT(A2:A8,1)="D"),B2:B8)/SUM(B2:B8),"0.00%")&" : "&TEXT(1-SUMPRODUCT(--(LEFT(A2:A8,1)="D"),B2:B8)/SUM(B2:B8),"0.00%")
That's perfect! Thank you so much.

Now it's time to decode the formula, so I can write it myself in future.

Very much appreciated.
 
Upvote 0
You're welcome. Thanks for the follow-up. :)

Actually, you could instead consider this shorter, more efficient, one.

23 01 14.xlsm
ABC
1Activity TypeAcrvity Duration (Minutes)Activity Ratio (Directed Learning : Guided Independent Learning)
2Directed Learning: Live Session9058.62% : 41.38%
3Directed Learning: Activity10
4Directed Learning: Content20
5Directed Learning: Activity10
6Directed Learning: Activity10
7Directed Learning: Content30
8Guided Independent Learning120
Split (2)
Cell Formulas
RangeFormula
C2C2=TEXT(SUMIF(A2:A8,"D*",B2:B8)/SUM(B2:B8),"0.00%")&" : "&TEXT(1-SUMIF(A2:A8,"D*",B2:B8)/SUM(B2:B8),"0.00%")
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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