Excel - Find starting month and repeat the value n numbers - excel-formula

I would like to find the value (column F) based on the starting month (column G) and repeat the value n times based on column E. The value of the monthly amount is given by =B5/E5. Example
Thank you.

Put this in H5:
=IF(AND(H$3<=$G5+$E5-1,H$3>=$E5),$F5,"")
And copy over and down.

Related

Count cell per month

I look for a code for the number of times a value is in a cell, on a monthly basis
So
1-1-19 KS
2-1-19
3-1-19 KS
.
.
1-2-19 KS
2-2-19
3-2-19
January 2
February 1
is this possible?
Assume that your dates are in column A, your KS is in column B.
In cell D1:D12 you have the first of each month entered and given a custom number format of mmmm so it just shows January, February, etc.
The formula =MATCH($D1,$A:$A,0) will give the row number that the month starts on.
For simplicity I'll call this Start_Row.
The formula =MATCH(EOMONTH($D1,0),$A:$A,0) will give the row number that the month ends on.
I'll call this End_Row.
The formula INDEX($B:$B,Start_Row):INDEX($B:$B,End_Row) will set a reference in column B to all rows between the first of the month and the end of the month.
I'll call this CountRange.
Now you just need to count what's in that reference using either:
=COUNTIF(CountRange,"KS") to count just KS
=COUNTA(CountRange) to count any non-blank cells.
So the full formula, without any helper columns, would be:
=COUNTIF(INDEX($B:$B,MATCH($D1,$A:$A,0)):INDEX($B:$B,MATCH(EOMONTH($D1,0),$A:$A,0)),"KS")
Keeping in mind that D1 contains 01/01/2019

Index/match if greater than

Hoping someone can help me with my trouble with an index/match formula.
Column B has a list of names, column C has the frequency of an action taken (sales made) whilst column D has the average sales value.
I've created in column G a track of the 6 highest sales which has worked great:
=LARGE($D$8:$D$13, 2)
Then I've used column F to determine the name that matches each sales average:
=INDEX($B$8:$B$13, MATCH(G4, $D$8:$D$13, 0))
So far so good! However, I'd like to only include the sales average if that individual has had more than 3 sales. IE; the value in column C is >3.
Can any one provide help or suggestions please?
I think you could use a helper column to filter out the values you don't need before applying =LARGE() in the very beginning, like this:
=IF($C8>3, $D8, "")
Then do =LARGE() to this column instead:
=LARGE($X$8:$X$13, 2)
You could use an array formula:
=LARGE(IF(range=criteria,values),n)
so for your case:
=LARGE(IF($C$8:$C$13>3,$D$8:$D$13), 2)
press CTRL+SHIFT+ENTER to enter an array formula.

Product if date = specific year

I am trying to compute the column M to do a product of column D if the date(column A) falls within the year as specific on column L.
So far I have tried the above formula =PRODUCT(IF(YEAR(A4:A345)=L5,D4:D345,1)) but it failed to work. Any suggestion?
I am afraid there is no such formula.
One workaround I can suggest:
Create a dummy column which stores IF(YEAR($A4) = $L4, $A4, 1) and now apply PRODUCT on this column. If this report is one of your presentable reports, you can hide this column.

How can I SUMIF where the IF evaluates whether a date is between two dates?

UPDATE: The contents of Column K were not, in fact, formatted as numbers all the way through.
Given:
Column F_____Column K_____Column M
3/1/2015_____1____________2/1/2015
2/1/2015_____2____________3/1/2015
2/1/2015_____3____________4/1/2015
where columns F and M are formatted as dates and K as numbers. Column F is not sorted, Column M is. Every date is for the 1st of its month.
I want to populate Column N such that each row sums the elements in column K whose corresponding value in Column F is in the month of Column M.
Tried:
SUMIF($F$2:$F$12500, AND(">="&M2, "<"&M3), $K$2:$K$12500)
Get zeroes across the board. Evaluating whether row 2 Column M and row 1 Column F are equal yields TRUE. What's going on?
With the assumption that all dates are the first of the month you don't have to restrict it to being in between the 2 dates on F:F but just rather that the dates has to match M2. With that in mind you can simply do the following:
N2 = SUMIF(F:F,M2,K:K)
This will add all the values in K:K for rows that have the same month (hence exact same date) as M2. Hope I interpreted your question correctly. Regards.

How to set column conditionally in Excel?

I have been working on a spread sheet for work for about a week and a half now and have been stuck in the same place. I am working on something for payroll purpose. So A1 would have an employee name as would the rest of the column. B2 would have that specific employees hours worked.
for example.
A B
1 Doe, John C 6.65
I need a formula that will automatically move anyone that has hours greater than 0 to column E, along with their worked. hours.
If you want the name in column E and the worked hours in column F then set E1 to
=IF(B1>0,A1,"")
and set F1 to
=IF(B1>0,B1,"")
If you want the name and worked hours both in column E then set E1 to
=IF(B1>0,CONCATENATE(A1," ",B1),"")
and copy down the column.
IF(condition, expression if true, expression if false) allows you to set cells based on a logical condition. CONCATENATE allows you to join the contents of multiple cells (or expressions) together as a string.

Resources