Require a formula help to return the total number of working days and the total percentages

mmr1

Board Regular
Joined
Aug 25, 2020
Messages
80
Office Version
  1. 365
Platform
  1. Windows
I needed a one-cell formula help to return the total number of working days and the total percentages based on the day-by-day data as shown in the expected results.

If the cell has SL text value, it is considered a working day


sample sheet with expected results enclosed.

Many thanks,

Book1
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
3Expected Results
425262728293031123456789101112131415161718192021222324DaysPercentage
51010OFF101010101010OFF101010101010OFF10101010LVLVLVLVLVLVLVLVLVLV1.87%
60100OFF000000OFFLVLVLVLVLVLVLVLVLVLVLVLVLVLVLVLVLVLVLVLVLV14%
7100100OFF100100100100100100OFF100100100100100100OFF100100LVLV100100OFF100100100100100100OFF2492%
81010OFFLVLVLVLVLVLVLVLVLVLVLV1010OFF101010101010OFF101010101010OFF1.66%
9100100OFF100100100100100100OFF100100100100100100OFF100100100100100100OFF100100100100100100OFF26100%
10100100OFF100100100100100100OFF100100100100100100OFF100100100100100100OFF100100100100100100OFF26100%
11LVLVLVLVLVLVLVLVLVLVLVLVLVLV5050OFF505050505050OFF505050505050OFF727%
12LVLVLVLVLVLVLVLVLVLVLVLVLVLVLV100OFF100100100100100100OFF100100100100100100OFF1350%
1300OFF100100100100100100OFF100100100000OFF000000OFF00SLSLSLSLOFF1350%
14100100OFF100100100100100100OFF100100100100100100OFF100100100100100100OFF100100100100100100OFF26100%
15100100OFF100100100100100100OFF100100100100100100OFF100100100100100100OFF100100100100100100OFF26100%
Sheet1
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
This seems to get the days
Excel Formula:
=BYROW(A5:AD15,LAMBDA(br,SUM(IF(br="sl",100,br))/100))
but may be wrong as you have explained how you get those results.

How are you calculating the percentage?
 
Upvote 0
Many thanks for your response.

Formula used for calculating days

AF5 formula=SUM(A5:AE5)/MAX(UNIQUE($A$5:$AE$15)) (SL Condition not included in the formula)

Formula used for calculating percentage

AG5 formula==ROUND(SUM(A5:AE5)/MAX($A$5:$AE$15)/MAX($AF$5:$AF$15),2)
 
Upvote 0
Yes, SL condition is required and it needs to be added in the formula.
 
Upvote 0
Ok, how about
Excel Formula:
=LET(m,MAX(A5:AD15),b,BYROW(A5:AD15,LAMBDA(br,SUM(IF(br="sl",m,br))/m)),HSTACK(b,ROUND(b/MAX(b),2)))
 
Upvote 0
Solution
Many Thanks Fluff for your formula Solution.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,102
Messages
6,123,097
Members
449,096
Latest member
provoking

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