This is a bit of a complicated question for excel, so I'll try to explain as best I can.
I'm trying to track membership time for each member in a group in the member list which is an excel sheet. Currently I have 2 columns, one for years and one for months which are both calculating the proper time based on the Join date of the members. My issue comes when trying to calculate for the subsection of members who have 'broken' membership time, meaning they left the group and rejoined some time later. To correct for that I have a second sheet that tracks the previous time for those members (also in columns of years and months) and I'm trying to add it to the first sheet. The formulas I have are below:
-To calculate the number of years since the member joined, then add any previous years from the PrevTime sheet, matching on column B which is Name on my primary sheet:
=DATEDIF(F2,TODAY(),"y") + INDEX(PrevTime!A:C, MATCH(B2,PrevTime!A:A,0), 2)
-To calculate the number of months since the member joined, then add any previous months from the PrevTime sheet, matching on column B which is Name on my primary sheet.
=DATEDIF(F2,TODAY(),"ym") + INDEX(PrevTime!A:C, MATCH(B2,PrevTime!A:A,0), 3)
Now, everything works fine with both these formulas, the issue comes when the member in question has some combination of current membership time months, and previous membership months that exceed 12. Then I end up with one less year for their membership time and more than 12 months for their membership months. (i.e. 2 years, 15 Months instead of 3 years, 3 months).
Was just hoping someone here might have an idea or any insight into things I could try to sort this out so the times are displayed nicely without overflowing the months past 12.
Thanks in advance
After looking at a few similarish questions I figured I needed something more specific so asking here. I will start by explaining the situation:
The Setup
I have a Store which sells Cakes, Cookies and Wine. I have the weekly sales data of each product sorta like this:
Product ID
Product Name
Quantity
Value
Week Ending
1
Ginderbread
2
£4
13/01/22
2
Chocolate chip
5
£25
13/01/22
3
Red Wine Bottle
1
£10
13/01/22
4
Sponge Cake
3
£9
13/01/22
Currently every week's data is stored within the same table, with me using a Week filter to show only the week i'm interested in.
Using this Data I created PivotTables that shows the sales of each category, with the ability to drill down to show the specific products. Table looks something like this:
Category
Quantity
Value
Cakes
2
£4
Cookies
7
£29
Wine
1
£10
The issue
I now want to stick in a new calculated column that shows the Value as a %. E.g The total value for the previous table was £43, so Cookies is about 67%. If I drill down, it would show the Chocolate Chip record as 80% and Gingerbread as 20%
I imagine doing this would be easier if each individual week's data was on a different table, but I got a lot of weeks and I also want to do tables showing the sales for over a period of time. Plus I don't know of a way to merge the "value" and "quantity" columns, etc instead of having 1 for each week being shown.
any advice would be appreciated
Create an extra column in the source table (prior to filtering) entitled "perc" calculated as the corresponding value for each row divdied by the total value across all rows (se pic. / eqn. for first row below) --
=E2/$E$6
No calculated fields required - just include perc as the mesaure of interest in your pivot table, with value setting as 'sum':
The reason why this worked is because of the common denominator - which allows one to sum ratios on a 1:1 basis.
Devising a calculated field using the standard 'fields, items & sets' functionality for ordinary pivot tables would not be feasible / possible as far as I am aware. You would need to move into the realm of power pivots and data models - which is not too complicated (readily accesible directly from the field list per below) - however, I see this as unnecessary complication for the task at hand.
Side notes:
Using table names in your functions is sometimes more convenient when entering, albeit may appear tricky at first when reviewing - first eqn above becomes:
=[#Value]/Table1[[#Totals],[Value]]
I have a pretty tall order here everyone,
I'm trying to make a rotating sanitation list for the remainder of the year for 3 teams.
I want the sheet to auto assign team members job areas (Rooms;columns B,C,D) based on the days of the week the work.
Members of Team 1 can only be assigned any Room Mon-Fri
Members of Team 4 can only be assigned any Room Sat-Tues and are the preferred team for Sundays
Members of Team 5 can only be assigned any Room Wed-Sat and are the preferred team for Saturdays
Each day in column A will have 3 (columns B-D) different employee ID's in each area(Room)
I want the sheet to keep everyone evenly spread out in terms of occurrences and for everyone to work all 3 sets of rooms.
As an added challenge, i would like to be able to add or subtract employee ID's to and from each team and have the sheet auto adjust.
I have a formula in column B that shows what I am trying to do, but it was from another person's work and I having trouble adapting it to my needs. Basically columns B,C,& D need the formulas.
This is the formula in Cell B3 and I just copied it down
=IF(OR(WEEKDAY($A2)=1,WEEKDAY($A2)=7),IFERROR(INDEX(Team1,MOD(MATCH(OFFSET(B2,IF(WEEKDAY($A2)=5,-5,-5),0),Team1,0),$U$2)+1),$G$2),IFERROR(INDEX(Team1,MOD(MATCH(OFFSET(B2,IF(WEEKDAY($A2)=2,-3,-1),0),Team1,0),$U$2)+1),$G$1))
The teams are set up in 3 separate columns using named ranges. I am not sure how to type the above formula to include all three teams and also get the formula to use Team 4 on only Saturday-Tuesday, Team 5 on only Wednesday-Saturday and Team 1 only on Monday-Friday.
I really wish I could upload this sheet for everyone to take a look at.
Thanks for any help I can get on this!
Answered from another forum and works perfect..no need for VBA
This proposal makes a few changes to the arrangement of the Team's
tables. This proposal also adds a helper column (E) which may be moved
and/or hidden for aesthetic purposes and is populated using:
=IF(WEEKDAY(A2,16)=1,IF(COUNTIFS(E$1:E1,4)<
COUNTIFS(E$1:E1,5),4,5),IF(WEEKDAY(A2,16)=2,IF(COUNTIFS(E$1:E1,5)<
COUNTIFS(E$1:E1,4),5,4),IF(WEEKDAY(A2,16)<=4,IF(COUNTIFS(E$1:E1,4)<
COUNTIFS(E$1:E1,1),4,1),IF(COUNTIFS(E$1:E1,5)<
COUNTIFS(E$1:E1,1),5,1))))
The room 4 column is populated using:
=INDEX(H$5:L$22,IF(MOD(COUNTIFS(E$2:E2,E2)+2*(COUNTIFS(E$2:E2,E2)-1),COUNTIFS(I$5:M$22,E2))=0,COUNTIFS(I$5:M$22,E2),MOD(COUNTIFS(E$2:E2,E2)+2*(COUNTIFS(E$2:E2,E2)-1),COUNTIFS(I$5:M$22,E2))),IF(E2=1,1,IF(E2=4,3,5)))
The room 5&6 column is populated using:
=INDEX(H$5:L$22,IF(MOD(COUNTIFS(E$2:E2,E2)+2*(COUNTIFS(E$2:E2,E2)-1),COUNTIFS(I$5:M$22,E2))=0,0,MOD(COUNTIFS(E$2:E2,E2)+2*(COUNTIFS(E$2:E2,E2)-1),COUNTIFS(I$5:M$22,E2)))+1,IF(E2=1,1,IF(E2=4,3,5)))
The room 7&8 column is populated using:
=INDEX(H$5:L$22,IF(MOD(COUNTIFS(E$2:E2,E2)+2*(COUNTIFS(E$2:E2,E2)-1),COUNTIFS(I$5:M$22,E2))=COUNTIFS(I$5:M$22,E2)-1,1,IF(MOD(COUNTIFS(E$2:E2,E2)+2*(COUNTIFS(E$2:E2,E2)-1),COUNTIFS(I$5:M$22,E2))=0,0,MOD(COUNTIFS(E$2:E2,E2)+2*(COUNTIFS(E$2:E2,E2)-1),COUNTIFS(I$5:M$22,E2)))+2),IF(E2=1,1,IF(E2=4,3,5)))
I have an excel file with 30 time cards, each on their own worksheet, where the only identifier is the worksheet name (ie the employee name). Each worksheet has a first column of account numbers, followed by columns for hours worked for each day of the month, and then total.
From these individual employee tabs I make a Totals worksheet(using =SUM('Adams:White'!B1) and then fill left and fill down. . .)
I then make a pivot on the Totals data and get summary data for the department. (ie we spent 100 hours total on account# 12345) - no problem.
My Question is: How do I write a formula(s) to find which employees contributed to the hours spent on account# 12345. The specific output I would want is a table with a column heading of "12345", and then only the names of those who worked on that account below the heading. (Or all names, sorted, with a second column of how many hours they worked on "12345").
Thanks!
Steve
Since you are feeding your data set into a pivot table, you will need to ensure each record (row) in your data set is reportable. i.e. if Adam and Jane worked on account 12345 for a total of 7 hours and your record in your data set (table) is only one row with the account listed and the total number of hours, it will be difficult and extremely bad practice to attempt to report this by staffer (how do you know that the 7 hours is made up of Adam and Jane, or it could be 14 part-time workers that each put in half an hour).
You have two approaches. One: you could consolidate the data into a master data tab and from there you could have each sheet (Adam, Jane, White) be a report off the master table to show performance by staffer.
Two: Make use of power pivot, if you have Excel 2013+ installed. Here you would create a link for each table by account. Now you would have each rep's hours contributed as a field in the power pivot connection.
Please let me know which of the two seems a better choice and I can assist from there.
Question:
=IF((COUNTIFS(Data!F:F,35,Data!H:H,E2))<=0,"Future",(COUNTIFS(Data!F:F,35,Data!H:H,E2)))
The above doesn't work on filtered data. I've scowered the internet and failed to find a solution after hours of trying. I managed to find a solution for a single count on a different column:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(Data!G:G,ROW(Data!G:G)-MIN(ROW(Data!G:G)),,1)),ISNUMBER(SEARCH(A3,Data!G:G))+0)
I cannot figure out how to manipulate this in order to find the count of rows with both values of 35 and E2. Any ideas?
Back story:
I have a system which is used for a service desk. This has tickets on it which have recorded data on them.
Worksheet 1 (Data):
I have exported this data into a spreadsheet to create trend charts on. The data collected is:
ID, Tag, Department, Month Created, Month Resolved, Week Created and Week Resolved.
I have then created another column which works out the difference in weeks (i.e. how many weeks it takes to resolve a ticket) and applied a filter to these columns.
Worksheet 2 (Count Data):
I have a table that counts the Amount of tickets created and resolved each week. Also I have another table that counts how many were resolved by how many weeks it took to be resolved, for example there are 235 tickets, that were created in week 35 and took less then 1 week to be resolved.
Worksheet 3 (Charts):
I have two charts that show the resolution/creation trends over the weeks and the counts of each week by how long the tickets took to resolve.
Problem:
Quite a simple spreadsheet however when I filter the Data's department to only show specific departments the charts remain unchanged. It turns out this is because the COUNTIF and COUNTIFS functions count regardless of filters. How do I get around the COUNTIFS issue?
=IF((SUMPRODUCT(SUBTOTAL(3,OFFSET(Data!H2,ROW(Data!H:H)-ROW(Data!H2),)),(Data!F:F=35)*(Data!H:H=E3)))<=0,"Future",(SUMPRODUCT(SUBTOTAL(3,OFFSET(Data!H2,ROW(Data!H:H)-ROW(Data!H2),)),(Data!F:F=35)*(Data!H:H=E3))))
This is how I solved the issue.