Excel: How to create a weekly calendar with a drop-down day selection? - excel

I'm trying to create a weekly calendar showing times of availability for a team. Header is "Monday"/"Tuesday"/"Wednesday" etc., with the time of day and availability of each team member to meet, as shown in the image:
In the header containing the day of the week, I want to create a drop down box where I can select other days and have the calendar automatically change to that day's availability. E.g. if I select "Wednesday" from the drop down box, the calendar updates the cells showing the data for Wednesday, but the calendar format still remains. I'm not sure how to do this using Data Validation; I know that Data Validation can create a drop-down list of values, but I don't know how to link the selection from that list to a group of cells that change based on the list selection.
Thanks!

There are various ways to accomplish this, but this is my favorite.
Create your list, as in the image, cells E2 to E8.
Click Data Validation under Data, Data Tools. Select List in the Allow: window and select your range in the Source: window. I did this for cell A2 in the example.
When done you can select the cell and see the values you can select from.
I recommend that the list be on another sheet and you can make it a table, but basically that is it.
As #Forward Ed pointed out, you still need the formulas in every cell referring to this value and whatever your data fields are in the background. Probably need INDEX/MATCH or VLOOKUP.
OBTW, you can also type in the values like this:

Related

Counting the frequency of unique entries in an excel column

I run a customer service department (I'm new to this so need to learn quickly) and I'm trying to get some analytics on our customer service requests. I have a table in excel documenting every individual service request and I would like a graph showing the total number of requests per customer.
I could write this manually (see below) but I would like it to automatically update as more service requests are entered.
I have tried looking for answers to this but can't find any that update automatically or that don't require a table elsewhere to be manually updated with each new customer. We often get new customers and I dont want to have to go back to this every time to update a reference table or customer list.
Surely there must be a way in excel to "Count all entries of each occurrence of a name in a column" in some kind of smart way?
I would really appreciate help with this!
Thanks in advance!
If you have 365 you could take advantage of spilled ranges.
On your second image put =UNIQUE(Table1[Customer]) in cell B3.
Put =COUNTIF(Table1[Customer],B3#) in cell C3 - this formula will
spill to all your unique customers.
Create two names ranges:
One called XAxis which references =Sheet1!$B$3#
One called ChartValues which references =Sheet1!$C$3#
Create your chart:
Set series value to =Sheet1!ChartValues
Set axis to =Sheet1!XAxis
Change Sheet1 to whatever your sheet is called remembering to wrap with ' if it has a space in the name.
Better to use pivot tables.
If below is your data,
Go to Insert > PivotTable
A popup will show like below
Specify the Table/Range
Specify also the Location (anywhere in the Existing Worksheet)
The view below will be displayed
Click the Customer checkbox and also drag the Customer field to fill the VALUES box as shown in the image below
You desired table will be displayed as below
Please vote up if okay.
Thank you everyone for your suggestions. I found a solution from multiple answers and comments.
I ended up going to my original table that I am using to create new service records. I added a column called "1" and just entered the number 1 in that column, for every row. I then "Hid" this column in the usual fashion.
I then created a pivot table from this table and selected to display columns "Customer" and "1" and used these columns to produce a bar graph. Here is the result (With the column "1" unhidden):
tl;dr:
Excel is unable to do this in any smart way, create a column in the original table contianing the number 1 so when a pivot table is made, it will auto sum the 1's for entries from the same customer. Create a plot from this.
It disgusts me . . . but it works.

Generate summary gantt chart from detailed activities

I want to create a gantt chart summary that shows a person´s whole "busy" and "free" schedule by day and in a single row, from a detailed gantt chart with a list of activities of different people in multiple rows.
Basically go from this:
To this: (which I created Manually)
To be able to give a summary of people´s shifts free time between activities.
Right now I´m just using this formula to compare the start and end date in each row and produce a "1" if the condition is True, then I just condition formatted the whole Gantt cells.
=IF(AND(Q$8>=$N12,DAY($K12)<>DAY($J12)),1,IF(AND(Q$8>=$N12-0.00001,Q$8<$O12-0.00001),1,""))
I have no idea how to start. I was thinking of doing the nest things:
Create a table of the names of all the possible people to be added in the gantt chart.
Program the macro to create a new sheet with the same template.
Program a loop which starts iterating with each person´s name:
For each person´s name which exists in the gantt chart to be summarized, start creating new rows per each day they have activities scheduled (I can´t figure out yet how I´d iterate through this).
Within the each person´s loop, start iterating each row on the original sheet, evaluating each start and end date´s and pasting on the new sheet´s current person´s current day row a "1" if the condition was true in the corresponding hours.
Loop until all individual activities of each person are finished.
Continue with next person.
I´d like to know if this is the logical way to go and if you have any pointers or similar code to recycle, I am not proficient in VBA and Excel macros.
Not sure if I understand properly, but it looks like you got a set of multiple records where you store the times In and Out of each worker, several rows for each worker.
And based on that, you would like to resume data, one row per worker, highlighting start and end time of each worker, but all in a single row.
I made a fake dataset like this:
I added 2 extra columns (you can even hide them if you don't want to see them)
Field START TIME got this formula:=B2-INT(B2)
Field END TIME got this formula: =C2-INT(C2)
In Excel, Dates are integers values and times are decimal values. I used both formulas to get only the decimal part of each start and end.
All this data is a table object named T_WORKERTIMES. I made a table object so if you add new records, the Gant Chart will autoupdate.
Then I made a simple (kind of horrible) Gant Chart:
The formula I've used in H2 and drag is:
=COUNTIFS(T_WORKERTIMES[Worker];$G2;T_WORKERTIMES[start time];"<="&H$1;T_WORKERTIMES[end time];">="&H$1)
Actually, all my data is in same sheet:
I added 2 Conditional Formating Rules to highlight cells in green/white if the result of the formula is 1/0.
Also, working with times sometimes can be hard, because decimals. 0,677083333335759 means 16:15. But 0,6770833333333333 too, so in Gant Chart I rounded up headers to 6 decimals.
My formula in H1 is =ROUND(7/24;6)
My formula in J1 and drag to right is =ROUND(H1+1/24/4;6)
So now everything works fine. Please, notice in worker 1, there is no activites from 07:00 to 08:00. So I add a new row with that data and everything updates:
I've uploaded a sample yo Google Drive you can see the formulas and hope you can adapt this to your needs.
https://drive.google.com/file/d/1KOuCAYsmlY9gfNUCUhIrihXu-tJz-K7t/view?usp=sharing
Biggest issue here is the decimal part of times, to make sure they fit the Gant Chart. An easy solution would be substracting just 1 minute to start time column (calculated, you can hide it) and sum 1 minute to end time column (calculated, you can hide it).
Hope this can guide you in your project.
It looks like you are trying to extract unique records per person and day to get a person/day summary of time availability but also want it to be automated as you add more people and days.
I was able to do this with a combination of powerquery and a pivot table. When new persons/dates are added or changed the report will update but you will need to refresh using CTRL+ALT+F5
you want to highlight your entire report or an area as big as you think it will get. While highlighted you will then utilize named range feature under FORMULAS tab -> DEFINED NAMES ribbon -> DEFINED NAME dropdown. We could name it REPORTAREA or something like that.
Make sure you change the conditional format formula in report to show 0 instead of "" so this can work properly
2 go to DATA tab -> GET AND TRANSFORM ribbon -> From other sources -> Blank Query.
This will open the power query editor as a blank query
3 In the formula bar type =Excel.CurrentWorkbook() case sensitive is important
4 From there you will see CONTENT and NAME column.
In the NAME Column select the drop down and go to TEXT FILTERS -> Equals... Type in the name of your named range so the query does not pick up anything else on accident.
5 Remove the NAME column by right click selecting it and then remove.
6 you will notice the CONTENT column has two curved arrows pointing left and right instead of straight down like you are used to in excel. Click these arrows and make sure you uncheck the "use original column name as prefix" option box and ensure that the EXPAND option is selected. Then click okay.
7 At this point it looks alot like your report. Go to the HOME tab -> TRANSFORM ribbon -> Use first row as headers.
8.Select only the columns that are NOT THE 24 hr STYLE TIME LABELS of your report and then right click -> Unpivot other columns
9 At this point you can start removing some of the columns you dont want by right click and remove. Also double click and rename the columns as you wish. You can right click the top of the column and change types to what you want.
Dont worry about the 24HR style time zones not looking correct as this will be fixed later, this column should be changed to decimal type and not time zone type.
select a column that has the date information you need and right click -> Duplicate column -> change type to date.
11.At the top left part of the screen there is a CLOSE AND LOAD drop down where you will load to a new worksheet.
That will produce a green table. Select the table and press ALT+D+P to produce a pivot table linked to the green table you produced from the query.
You may need to close the Queries and Connections box that opened in order to see the pivot table options that will appear on you right.
Drag the 24hr style column to the columns area.
Drag the People to the Rows area and after Drag the Column you made in step 10 to the Rows area.
Drag the conditional format column to the Values area.
Your pivot table wont look exactly like what you want. while pivot table is selected go to DESIGN tab -> REPORT LAYOUT -> Tabular and also SUBTOTALS -> DO NOT SHOW SUBTOTALS while in the same tab.
13 Highlight all of the 24hr style time labels and format them and after highlight the inside of the pivot table where all the 1 and 0 will be and apply the conditional formatting you applied previously. Dont forget you changed the formula originally so your if statement does not end with "" but instead with 0.
If you would like i think it is easier to switch around the ROWS and COLUMNS area of the pivot table fields so that the report is easier to read. I have chosen to do so in the pictures. If you want to keep the report the way you are used to you can follow previous instructions.
I put the above comment down here as a complete answer.
I call those cells after "Finish date" column as "Chart cells". To extract a unique list of names, please refers to: here
If each name, you can use the followings formula and format for cells value >0 to show the bars.
=SUMIF([name range], "[each name]", [for each column of the chart cells])
If you further needs to filter by dates, you need to use sumifs() instead:
=SUMIFS([each column of chart cells], [name range], [unique name obtained from above], [Finish date range],"<=" & DATEVALUE("[target date]")+1,[start date range],"<=" & DATEVALUE("[target date]"))
This is the Excel formula solution, which is good if your table is not huge.

How to automatically populate range of cells from other sheet using a drop-down menu

I'm unable to automatically populate range of cells based on the month chosen from the drop-down menu.
I have 2 sheets (dashboard and data dump). In the dashboard tab I have a drop-down menu with a list of months (from June to March 2020). Below that I have 5 columns, list of material, start date, end date, cost, and received/not received (Y/N). The data dump also contains the same columns/info as the dashboard tab.
The objective was to choose a specific month from the drop-down menu, which then in a data dump tab, finds all of the materials that are anticipated to be received in the same month and automatically populate the list. The end date would be the 'anticipated to be received' date and all corresponding material would be automatically populated in the dashboard tab.
I've tried to use INDEX(MATCH) formulas in Excel but I realized 2 problems:
The drop-down menu months' dates are always the 1st day of the month whereas, End Date column in data dump tab has different dates. I found a workaround with this by subtracting End Dates to always equal the 1st day of the month
Because there are no unique formulas or IDs, the Excel stops at the first material it finds using INDEX(MATCH) which meant if I copied this formula to a range of cells underneath the first row, the results were always the same material.
I've watched some Youtube instructors use UNIQUE/FILTER functions but apparently these functions are not available to the public yet. I have entered the info manually for now but what I would like to do is to choose the month in the drop-down menu and have the equipment list below automatically populate.

Change chart according to two drop down lists with data from multiple sheets

Hi i would like to create a dashboard where my charts will change when I filter them by country and months according to their respective drop down lists.
For example: Sorted by 'Australia' and 'Aug'
My charts are linked to the table as shown. For example, one of the data source is O60:P62.
The problem:
For each country, I have different sheet tabs with similar data formats with different values. I would like to know how can I use one master drop down list in my 'Dashboard' sheet and link it to each data source in each sheet when I choose a specific country from the drop down list.
Adding on, the second drop down list for months will follow according for the country selected from the first drop down list. The end result would be my dashboard charts changing according to the country and month selected.
I hope my explanation is clear. Thanks in advance!
For the country, you you have to fill the data on the Dashboard worksheet with the INDIRECT worksheet function to get the data from the worksheet of the selected country.
Just as an example, let's assume the formula in B61 is ='Australia'!B5, then you have to replace this with =INDIRECT("'"&$A$1&"'!"&CELL("address",B5)).
If you then change the contents of A1 either by typing directly or through the drop-down box (e.g. replace Australia with Malaysia), the formula will get the data from the Malaysia worksheet.
And for the month, you can find the data with a simple INDEX(MATCH) combination, or with a HLOOKUP. Instead of typing "Aug" in P60 and P64, you put =$B$1, so it takes the value from the drop down box.

Nested formula with countif

I am trying to create a monthly filter option on a speadsheet for my boss. The overview spreadsheet consist of countif formulas. My boss would like me to add a filter, where he can enter July or 7(yellow cell) to get the data filtered to that month. Is there a nested formula within excel to do this? I am unfamiliar with nested formulas.
Data source
Overview worksheet
Sounds like you could use pivot tables.
1) Select all your data with the headers
2) Go to the insert tab and click pivot table (just click ok for now)
3) Drag whatever values you want counts for into the rows section
In this case drag down the dates for example
4)Next drag whatever you want to perform an action on into the values box...in this case since we want to count how many instances of a single date or month occur, we drag this down into the box.
5)In the dropdown menu for the values, change it to count.
6) Done
You can create your entire overview sheet using this single pivot table and not a single formula. Hope that helps.

Resources