Please refer to the document: http://1drv.ms/1H3Ntk2
I am trying to figure out who is not scheduled for each week, in col F. The list of Staff members are in Col H. My data goes up to 52 weeks.
Supposing that you have the following:
Put this formula in F2 and press ctrl+shift+enter to calculate the formula; and then copy and fill down until the last row:
=INDEX($H$2:$H$6,SMALL(IF(ISNA(MATCH($H$2:$H$6,B2:E2,0)),ROW($H$2:$H$6)-ROW($H$2)+1),1))
I hope it works. It is shorter than your own solution, at least.
Related
I have searched high and low on the internet and still can't find a solution to what seems to be a simple issue so I am here hoping someone will enlighten me.
I have a table(not pivot) in Excel 2010 and I need a formula that will calculate the average of a group of cells in column B based on the date in column A and display it in column C but only on the first line of the date(s).
Columns A and B are static. Only column C needs a formula.
Thanks in advance for any ideas.
Here is what I want the table to look like when calculated:
Solution 1 - using a helper pivot table
You can first use the data in Column A and B to make a pivot table such as the following, suppose the pivot table is located in Column F and G, change the value field settings of Sys to summarise the value filed by Average :
Then in cell C3, enter the following formula and drag it down:
=IF(A3=A2,"",VLOOKUP(A3,F:G,2,0))
Solution 2 - using array formula
In cell A3, enter the following formula and then press Ctrl+Shift+Enter upon finish, then drag the formula down:
=IF(A3=A2,"",AVERAGE(IFERROR(List_Sys/(List_Date=A3),"")))
Find attached :D I used Averageif function, and if to verify if any change in date. then just scrolled down.
Screenshot:
Try following formula-
=IF(COUNTIF($A$3:$A3,A3)=1,AVERAGEIF($A$3:$A$19,A3,$B$3:$B$19),"")
Not really an Excel user, but what seemed simple has turned out to be very difficult for me. I am in trouble as I can't come up with a nice and clean (or any) way to get it working.
What I have here:
I need to create a new columnn that would tell the amount of employees in each occupation while ignoring the duplicates (highlighted).
The amount of names formula is working, so maybe this can be used ? Or maybe it's just in the way and should be cleared.
It's just:
=COUNTIFS(A:A;A2)
Tried searching for quite a while did not find anything suitable. Any help or advice would be much appreciated. I hope I explained it in clear manner.
Thank you
Without helper columns:
Two options, D2:
{=SUM(--(FREQUENCY(IF($B$2:$B$9=C2,MATCH($A$2:$A$9,$A$2:$A$9,0)),ROW($A$2:$A$9)-ROW($D$1)+1)>0))}
Or put in E2:
{=SUMPRODUCT((($B$2:$B$9=C2))/COUNTIFS($B$2:$B$9,$B$2:$B$9&"",$A$2:$A$9,$A$2:$A$9&""))}
Notice both are array formulas and should be entered through CtrlShiftEnter
SUMPRODUCT 'Deals' in Arrays 3
You might have employees with the same name (David, Michael) in different occupations (Tech & Worker, Tech & Economy). To distinguish those from each other, in B2 you can use:
=SUMPRODUCT((A$2:A$21=A2)*(C$2:C$21=C2))
In D2 you can use:
=SUMPRODUCT((1/B$2:B$21)*(C$2:C$21=C2))
Distinct Employees Occupation Count
with a helper column
Unique and Distinct values are tricky. Using a helper column is beneficial for identifying either one of these when coupled with an expanding range:
=SUMPRODUCT((A2=$A$1:$A1)*(C2=$C$1:$C1))
Relative Rows: ^ ^
Paste to cell E2.
Copy Drag the formula down from the where pasted.
The relative row numbers identified above well increase as the formula is copy dragged down. This creates a larger and larger range for comparison. An expanding range.
In this case the range that is expanding is the range of already checked values. Many times the result range is expanded and tested against to eliminate posting duplicates of already posted results in subsequent rows of the results list.
The helper column's value is how many times the name and occupation pair has previously appeared. Zero previous appearances tells us this is the first occurance. We will only count the zeros (first occurance) in the main formula.
The main formula for counting distinct employees in each occupation:
=COUNTIFS( $C$2:$C$9, C2, $E$2:$E$9, 0)
Paste to cell D2.
Copy Drag the formula down from the where pasted.
Here we count all the rows for this row's occupation where the occupation matches the range of listed occupations and for that particular row in the list of occupations, the helper column row value is zero.
Add a final column which is the concatenation of the prior 3 columns then use
=SUMPRODUCT(1/COUNTIF(D2:D9,D2:D9))
There is a good explanation of this formula here. Basically, values that appear once will count as 1. Values that appear more than once will appear as fractions of their total occurrence count and be summed to 1.
If you convert your data to an Excel table by selecting a populated cell in the range and pressing Ctrl+T, then formulas will auto-populate down last column. You can then reference the table columns in the formula and you won't need to amend the formula as you add rows.
I'm a novice to Excel. I don't which formula to use. I want to set up a budget for 12 months, that quite easy ex. 12000/12= 1000 in 12 columns. I need a formula for when one column answer is changed by hand lets say to 2000, that will the remaining columns answers automatically change to 909.09. I don't which formula to use and if its do able?
Thanks for your help
Kind regards
Johan
You could add a helper column in which you keep track of the manually entered values.
Let's say the Total value (12000) is in A1, months are in column A2:A13 and the helper column is column C.
Column B would then be;
=IF(C2<>"",C2,(A$1-SUM(C$2:C$13))/(12-COUNT(C$2:C$13)) for cell B2, simply extend to the other cells in column B
My question is relatively simple I believe, just not getting it just yet. So here is where I am having trouble,
Let's say, Column C has numbers from C3:C33, I have other items underneath C33 but want to have a SUM of C3:C33 in Column J4 as total. That is easy enough, but when I try inserting a line at C33 to add an additional number, it doesn't automatically SUM in the cell J4. I've looked for answers and I've came across this formula:
=SUM(INDIRECT("C3:C"&ROW()-1))
That works right under C33, and works fine if I have J4 =C33 and just simply hide that formula's row. But I'm wondering is there another Formula that will automatically auto adjust SUM from J4?
Any help would be great!
-Maykid
Use:
=SUM(C3:INDEX(C:C,MATCH("Totals",A:A,0)-1))
Now no matter the number of rows, it will sum only those from C3 to the row above where Totals is found in column A.
Try to use SUM(C3:C34) and leave C34 blank. You should now be able to insert below C33 and the formula should automatically adjust.
I have a spreadsheet with 4 columns : A, B, C, D.
I want to calculate the difference between A-B and C-D. So in cell E2 I enter the formula =A2-B2 , and get the result that I want, which is the difference between A-B.
Now I drag the formula in E2 to cell F2, expecting that Excel will "think" that now I want the difference between C-D. However, when I drag the formula from column E to column F I get =B2-C2 (you see, Excel assumes I want to use B2 again).
My question is: how can I make Excel “understand” that I want to use =C2-D2 after =A2-B2, and NOT =B2-C2?
This an abbreviated example. The original data-set has hundred of columns. Thanks for your help.
Enter Formula in E2
Drag the formula up till G2. Now G2 will have the formula which you want.
Delete Col F. Now Col G will move to Col F, which will have your required formula
There's no way in the UI that you get Excel to "think" that much - it'll only shift the references by one column if you drag it across. If deleting the columns in between is not an option, you need to rewrite you formula, e.g.:
=OFFSET(A1,0,COLUMN(L1)-COLUMN($L1))-OFFSET(B1,0,COLUMN(L1)-COLUMN($L1))
In this example, it is assumed that you start showing the difference in column L - of course you need to adjust according to your worksheet - but once done, you can drag the formula to the right as far as you need.
As your original data-set has hundreds of columns, you may want to use a non-volatile formula, eg:
=INDEX(A1:K1,1+COLUMN(L1)-COLUMN($L1))-INDEX(A1:K1,2+COLUMN(L1)-COLUMN($L1))
This will speed up calculations in the workbook. Depending on how big the data-set is and how many other formulas are in the workbook, the difference in speed could be enormous.
The same conditions apply as in Peter's example.