How to Display months based on the Quarter Selection - excel

I have 2 columns in Excel sheet, Column1 has the Quarter Selection dropdown box(Q1, Q2, Q3 and Q4). And Column2 has the month selction dropdown box.
I need help in the below.
Q1 - Feb, March, April
Q2 - May, Jun, July
Q3 - Aug, Sep, Oct
Q4 - Nov, Dec, Jan
Now if a user selects Quarter as Q2 in Column1, the Dropdown values in Column2 has to have only May, June and July.
I tried the grouping option but it doesn't help me.
Thanks in Advance,
Satish D

You should create two tables, one containing quarters, and other containing all quarters with corresponding months (tables are surrounded with thick border).
Then in cell A2 create simple data validation and set list in D1:D4 as source.
In cell B1 also create data validation list, set allow to list, and in formula area please enter this formula =OFFSET(INDIRECT(ADDRESS(MATCH($A$1,E1:E12,0),5)),0,1,3,1)
You data validation list in cell B1 is now dependent on selection in list A1.

Related

Need to revise this formula that displays data based on another cell's contents

I can't get this formula working properly. Here is what I need to do (see included image below):
I need the data in rows 9-10 (sales) to be displayed/copied in rows 28-29 (collections) based on the number in cells C9 and C10 (payment terms). For example, if there are $1,900 in GM sales on Tuesday, Jan 5 (cell F9) and payment terms are 10 days (cell C9), then I need $1,900 displayed on Tuesday, Jan 19 (cell P28), in the collections section (rows 28-29), 10 business days from when the sales were made. Does this make sense? Here is the formula I am using now (starting in cell E28 and being dragged to the right):
=IF(COLUMN() - E9 < 1, 0, INDIRECT(ADDRESS(9, COLUMN() - $C$9)))
However, it is not working completely. It is moving the data labels to the left of the data table that are not supposed to be included in the data table. Only sales data starting in cell E9 are supposed to be moved. You can see this issue in row 28 (columns J-N) in the image below.
This formula also has to work with payment terms from 1 day - 10 days. So, the $5,000 in Ford sales on Monday, Jan 4 (cell F10), with payment terms of 3 days (cell C10), needs to be displayed on Friday, Jan 8 (cell I29).
Let me know if you need any additional details to solve this issue. Thanks!
Is this what you're looking for?
=IFERROR(INDEX($E$9:$X$13,MATCH($B28,$B$9:$B$13,0),MATCH(WORKDAY(E$5,-INDEX($C$9:$C$13,MATCH($B28,$B$9:$B$13,0))),$E$5:$X$5,0)),0)
The formula indexes the sales amounts and shows the amount in the row where the customer name mentioned at sales equals the customer at the result section with the column where the result date equals the date mentioned at sales minus the number of workdays mentioned behind the customer name at the sales section.

Excel | Formula to find total amount in this situation

Assume that we are currently in the month March. I have a table with all the months and a list of products. Inside each column i have the number sales a product has made on that month, like so:
Notice i have a cell containing "Total until current month". I would require a formula to find out the total amount of sales of a specific product (product A for example) up until March (current month) as you can see with the manually typed 6, 1 in Jan and 5 in Feb.
I would usually do this by finding the sum of cell C4 and D5. But this should be 1 dynamic formula that is updating as we progress onto next month. So as an exammple, in April, it will find the sum of cell C4 - E5 (Jan - March) and update the value.
Is this possible?
Regards
Put a helper row above the month names that has the month numbers 1-12.
Then use SUMIFS():
=SUMIF($C$2:$N$2,"<=" &MONTH(TODAY()),C4:N4)
You could hide that row so it is not visible and not readily accessible.
In row 3 put month numbers. Now if in cell Q4 you have a month number that you want to relate to use:
=SUMIF($C$3:$N$3,"<"&$Q$4,C5:N5)
for sum of A and drag down for other products.
If you want to pick the product you want sum for and have it all in one cell, then assuming that in cell R4 you have your product name (e.g. "B") write
=SUM((C3:N3<Q4)*C5:N6*(B5:B6=R4))
and press ctrl+shift+enter.
The simplest solution is to leave E4 through N4 empty. Only put a value in E4 once March is complete and you have a value for March. This will allow a formula like:
=SUM(C4:N4)
for Product A

How to find the last 8 quarters and their years from the current quarter and year or a given date

I am trying to find the last 7 quarters from the given quarter and year in MS Excel.
For eg.
if I have Q1 2016 then I should be able to find Q4 2015 in one cell and Q3 2015 in another cell and so on showing the last seven quarters. This should be dynamic i.e when the current quarter changes, the year should move also wherever required.
I have been able to find the last quarter number using the following formulas:
=CHOOSE(CEILING(MONTH(E4)/3,1),1,2,3,4)
and
=IF(F5-1=0,4,F5-1)
But I am not able keep the year dynamic.
If the current quarter is Q1 2015 then the quarters I need would be:
Q4 2015
Q3 2015
Q2 2015
Q1 2015
Q4 2014
Q3 2014
Q2 2014
Your question is not clear. But, with some date in E4, the following formula will return Qn YYYY. If you then fill right, it will return the preceding quarters. If your layout is different, you will need to adjust the formula accordingly.
EDIT Formula adjusted to be able fill right instead of down
F5: ="Q" & INT(MONTH(EDATE($E$4,-(COLUMNS($A:A)-1)*3))/3)+1 &" " & YEAR(EDATE($E$4,-(COLUMNS($A:A)-1)*3))
The formula subtracts a multiple of 3 months from the date in E4; and computes the quarter and year for that date. By using the ROWS function, that multiple is incremented each time you fill down one row.

Predict number of employees for upcoming months

I have an Excel sheet with columns for the start and end dates of employees in a project. Like:
Name (Cell A1) Start Date(Cell B1) End Date(Cell C1)
John Doe (A2) 9/1/2015 (B2) 3/1/2016 (C2)
D Barret (A2) 8/1/2015 (B2) 2/1/2016 (C2)
D Barret (A2) 7/1/2015 (B2) 8/1/2015 (C2)
Based on these start and end dates, I want to count the number of resources in the next months:
Month (F1) #Employees (G1)
Jan 2016 2
Feb 2016 3
I want to autopopulate the #Employees column with numbers based on the start and end dates. So if there are three people who start/continue in February of 2016, then I will have those three minus the people who leave in January.
What would be the best way of achieving this in Excel?
See the formula in cell B9 below. I am a little confused on exactly what you are asking for. The below function will count the amount of employees that are currently working in January 2016. So essentially the Jan 2016 has to be between the employees start date and end date.

Dynamically change the number of days in a month for dropdown

It has to be done without VBA.
I have a list of months to be filled in one cell, say A1. The options can be filled using Data Validation-List (=Months) which causes a dropdown to appear in A1. In cell B1 I enter a year number (for example 2000).
Now I want C1 to contain a dropdown, the entries in which change on the basis of the data in A1 and B1. In my example, A1 offers the choices january, february, march, april, may, june, july, august, september, october, november and december.
If I select january or march or may or july or august or october or december (months with 31 days), I should get numbers between 1 and 31 as an option in C1.
If I select april or june or september or november (months with 30 days), I should get numbers between 1 and 30 as an option in C1.
If I select february, I must first check if an year is leap year with this formula:
=((MOD(B1;4)=0)*((MOD(B1;100)<>0)+(MOD(B1;400)=0))=1)
and based on result of this formula(TRUE or FALSE), I should get numbers between 1 and 28 (or 29 if is leap year) as an option in C1.
I have created lists, named Days30, Days31, Days28 and Days29. How can I use Data Validation to switch between those lists for my dropdown in C1?? I'm trying to translate this logic into Data Validation formula, but no luck:
If (A1 = "april" OR A1 = "june" OR A1 = "september" OR A1 = "november") Then
Days30
ElseIf (A1 = "february" AND leapyear = 1) Then
Days29
ElseIf (A1 = "february" AND leapyear = 0) Then
Days28
Else
Days31
End if
In Z1 put this formula, =DAY(DATEVALUE(A$1&" "&ROW(1:1)&", "&B$1))
In Z2 put this formula, =IFERROR(IF(MONTH(DATEVALUE(A$1&" "&ROW(1:1)&", "&B$1))=MONTH(DATEVALUE(A$1&" "&ROW(2:2)&", "&B$1)), DAY(DATEVALUE(A$1&" "&ROW(2:2)&", "&B$1)), ""), "") ... and fill down to Z31.
Go to Formulas ► Defined Names ► Name Manager. When the Name Manager dialog opens, click New.
Give it a name (e.g. lstDOM), leave it as Workbook scope and supply the following for the Refers to: =Sheet1!$Z$1:INDEX(Sheet1!$Z:$Z, MATCH(1e99, Sheet1!$Z:$Z))
Click OK to create the dynamic named range then Close.
With C1 selected, go to Data ► Data Tools ► Data validation. Choose Allow: List and supply =lstDOM for the Source:.
Your results should resemble the following.
      

Resources