Good Afternoon All
Its been a long time since I've used Excel and have become stuck and I hope you can help
Column O3 = 3
Column P3 = 4
Column Q3 = =IF(P3<=O3,MAX(0),IF(P3>=O3,MIN(2),IF(P2=O2+1,MAX(1))))
If PAR = 3 (O3) then if I score 3 or less (P3) I want to show 0 (Q3), if I score 4 I want Q3 to show 1 (Q3), If i score 5 or above I want to show 2 (Q3)
Thanks
Wayne
Wyane,
I think your macro must be like this :
=IF(P3<=O3,0,IF(P3=(O3+1),1,2))
If P3 <= O3 = 0
If P3 = O3+1 = 1
Else 2 (score 5 and above)
Related
I have a data frame and want to update specific cells in a column based on a condition on another column.
ID Name Metric Unit Value
2 1 K2 M1 msecond 1
3 1 K2 M2 NaN 10
4 2 K2 M1 usecond 500
5 2 K2 M2 NaN 8
The condition is, if Unit string is msecond, then multiply the corresponding value in Value column by 1000 and store it in the same place. Considering a constant step for row iteration (two-by-two), the following code is not correct
i = 0
while i < len(df_group):
x = df.iloc[i].at["Unit"]
if x == 'msecond':
df.iloc[i].at["Value"] = df.iloc[i].at["Value"] * 1000
i += 2
However, the output is the same as before modifications. How can I fix that? Also what are the alternatives for better coding instead of that while loop?
A much simpler (and more efficient) form would be to use loc:
df.loc[df['Unit'] == 'msecond', 'Value'] *= 100
If you consider it essentially to only update a specific step of indexes:
step = 2
start = 0
df.loc[df['Unit'].eq('msecond') & (df.index % step == start), 'Value'] *= 100
I wonder if there's a quick solution to the following:
My goal is to divide a cell value by three, using the same value for three cells in a row, then switch to the next value in the series for another three cells in a row, and so on.
So my starting data would look like:
A B C D E
1 9 12 6 21 27
2 30 9 3 0 3
3 ...
I want the new cells to look like:
AA AB AC AD AE ...
1 3 3 3 4 4
2 10 10 10 3 3
...
Where the cell AA1 = A1/3, AB1 = A1/3, AC1 = A1/3, but AD1 = B1/3 and so on.
I need to do this for many observations, preferably using an excel formula.
Does anyone have any ideas on quick solutions?
Really appreciate your help.
Best,
Henry
Use INDEX:
=INDEX(1:1,0,ROUNDUP(COLUMN(A1)/3,0))/3
I have been given a table with retention rates starting from day 1 to day 364. I have been given a current DAU count of 600k with a degradation rate of 2% per week(I am assuming current DAU means DAU on Day 1. The other information includes a count of daily acquired new users which is 10k.
The problem is to forecast/predict users on day 365.
What would be the best way to approach this problem?
I don't know whether my approach is correct but below is what I am thinking.
Step 1: Starting from a count of 600k on day one add 10 k users each day. On day 8 deduct 2% from day 7 count and perform the same operation till day 364.
Step 2: For the retention rates. Say day 1 - 100%, 2-60%, 3-40%, 4-30%...day 364-1%. Calculate DAU using values in Step 1 and run a cumlative sum using the retention rates.
Example:
Day 1 - 600,000 * 100 %
Day 2 - 600,000 * 60% + 610,000 * 100%
Day 3 - 600,000 * 40% + 610,000 * 60% + 620,000 * 100%
and so on
Once I have the DAU from Day 1 to Day 364 use Time series forecasting and predict the DAU for Day 365.
Thank you!
Adheip
Let :
A1 = day
B1 = RR
C1 = no of users
A2 = 0
B2 = 100%
C2 = 600000
E1 = 0
F1 = 1
G1 = 2
H1 = 3
I1 = 4
J1 = 5
K1 = 6
L1 = 7
M1 = 8
N1 = 9
O1 = 10
P1 = 11
Q1 = 12
R1 = 13
with
D2 =SUM(E2:R2)
drag until D16,
C3 =C2+10000
drag until C16, and
E2 =IF(E$1>$A2,0,INDEX($C:$C,MATCH(E$1,$A:$A,0)))*INDEX($B:$B,MATCH(E$1,$A:$A,0))
drag until R16.
Hope that helps. (:
I am trying to use the index with match function to give me the order of people based on their rankings. My data is something like this:
A B C
1 Rank Name Score
2
3 1 Joe 100%
4 3 Bob 80%
5 1 John 100%
6 2 Dan 90%
7
8 RankOrder Name
9 1 =index(b3:b6,match(1,a3:a6,-1)) Result = Joe
10 1 =index(b3:b6,match(1&<>"b9",a3:a6,-1)) Result = John **HELP
11 2 =index(b3:b6,match(1&<>"b9&b10",a3:a6,-1)) Result = Dan **HELP
The first formula is to find who has a ranking of 1 or greater, then the second and third formula is where I'm struggling. I need to find who the has the next ranking closest to 1 but has not already been outputted in cell B9. Then the next formula would be the same but not someone that's been outputted in cell B9 & B10. Hopefully this make sense.Thanks!
Use index and aggregate with countif for aggregate's k factor.
=INDEX(B$1:B$6,AGGREGATE(15,6,ROW($3:$6)/(A$3:A$6=A9),COUNTIF(A$9:A9,A9)))
I have a tiered commission rate based on the number of sales that I cribbed from a couple of Excel Formulas:
Min Max Payout Differential
1 5 $3.00 $3.00
5 $4.00 $1.00
Starts at A1 and ends at D3. Sheet is named Tiered Bonus
On another sheet I have the following program referencing Tiered (row 2):
=IF(ISBLANK($A2),"",SUMPRODUCT(--($K2>'Tiered Bonus'!$A$2:$A$3),--($K2-'Tiered Bonus'!$A$2:$A$3),'Tiered Bonus'!$D$2:$D$3))
Putting 5 in sales, however, yields only $12 when it should yield $16 (4*3)+(1*4). I know there's something obvious that I am missing but I can't see it
First, make sure that A1:D3 is set up this way...
Min Max Payout Differential
0 5 $3.00 $3.00
4 $4.00 $1.00
Then, with K2 containing 5, the following formula will return 16...
=SUMPRODUCT(--($K2>$A$2:$A$3),--($K2-$A$2:$A$3),$D$2:$D$3)
Note that the calculation takes place this way...
(5 - 0) x 3 = 5 x 3 = 15 '$3.00 for anything over 0
(5 - 4) X 1 = 1 x 1 = 1 '$1.00 for anything over 4
Hope this helps!