I have this excel sheet that need to be adjusted. I have this STOCK Quantity column (STOCK Qty) and I need it's column to be linked to the AZ column on sheet1. And it just not linked directly, but i need to plus 9 to get it linked to the exact column.
Here to explain it further. First i need to add this formula into the "STOCK Qty" column D2 : =SUM(Sheet1!AZ1) :
But then on the column after that, say column D3, D4 and so on, i need to add 9 to each column. So column D3 will have the formula of =SUM(Sheet1!AZ10) and D4 will have the formula of =SUM(Sheet1!AZ19) and so on :
So, i hope that you could understand my question. Thanks in advance! :)
You can use INDEX function with ROWS to increment by 9 each row - try this formula in D2 copied down
=INDEX(Sheet1!AZ:AZ,9*(ROWS(D$2:D2)-1)+1)
Note you probably don't need SUM, either with this formula or yours because its only a single value
I will use the offset function, instead
=SUM(OFFSET(Sheet1!$AZ$1,(ROW()-2)*9,0))
In addition, if you are not summing anything, just
=OFFSET(Sheet1!$AZ$1,(ROW()-2)*9,0)
Related
I have two tables.
Table 1
Table 2
Now I want a function to compare Test column and when they are equal (for example row 2 of table matches row 3 and 4 of table 2) I need to compare the price column to check the max (in this example row 3 600 is greater than row 4 550) and then return my chosen column. So this should return "pixel as Value1" and "4 as rank".
I tried VLOOKUP, IF but was not able to merge them to get the desired result. Any help is appreciated.
If you have Excel-365 they could use FILTER() and SORT() function with INDEX(). Try-
=IFERROR(INDEX(SORT(FILTER($E$9:$G$12,$D$9:$D$12=$A2),3,-1),1,COLUMN(A$1)),"")
Quite similar to #Harun's answer, but I used:
Formula in B2:
=IFERROR(INDEX(SORT(FILTER(E$2:H$5,E$2:E$5=A2),4,-1),{2,3}),"")
In case you don't have Excel-365, you could do like this.
My formula in cell B3 is:
=INDEX($B$14:$B$17;MATCH(A3&SUMPRODUCT(MAX(--($A$14:$A$17=A3)*$D$14:$D$17));$A$14:$A$17&$D$14:$D$17;0))
Formula in cell C3 is almost the same, just change first argument on INDEX to retrieve Rank column:
=INDEX($C$14:$C$17;MATCH(A3&SUMPRODUCT(MAX(--($A$14:$A$17=A3)*$D$14:$D$17));$A$14:$A$17&$D$14:$D$17;0))
Notice both formulas are array formulas so they must be entered pressing CTRL+SHIFT+ENTER or it won't work!
Also, if the test is not found, it will raise an error. For example, now with values a and d won't work because those values are not present in Table2.
Here's another option if you're not running Excel 365
=INDEX($H$2:$H$5,MATCH(AGGREGATE(14,4,($G$2:$G$5=A2)*$J$2:$J$5,1),$J$2:$J$5,0))
and
=INDEX($I$2:$I$5,MATCH(B2,$H$2:$H$5,0))
The formulas above are in cells B2 and C2, as per the image below
I want to add a formula in penthao report to get sum of distinct values in a column. The formula of penatho is similar to excel. So how do i do that in excel. Please help.
I'm not sure if this can be done in a single cell, but it certainly is possible by adding in an extra column. For instance, if your range is A1:A25, you can type this formula in Cell B1 and drag it down to cell B25:
=IF(COUNTIFS(OFFSET($A$1,0,0,ROW(),1),$A1)=1,1,0)
This formula enters a 1 if the value in the range is the first occurrence, and 0 otherwise. The last step is to use a simple sumproduct for the final result:
=SUMPRODUCT($A$1:$A$25,$B$1:$B$25)
I'm trying to create a formula in column K which sums all cells that apply , in column J, only when the following conditions are true:
dates are the same in column A
AND client name is the same in column B
For example, in cell K2, I want the sum of J2+J3+J4 because A2=A3=A4 and B2=B3=B4.
K5=J5 only, because there are no other dates with the same client name.
K6=J6+J7 because A6=A7 and B6=B7.
What kind of formula would I use for this? I can't figure out how to do it with a SUMIFS.
I would try using a pivot table with:
The names as row values
The dates as the column values
And funds received using SUM in the values column
Edit
Based on #pnuts comments here is how to get the values in column K. Put this in K2 and drag down.
=IF(OR(COUNTIFS($B$1:B3, B3) = 1, B3 = ""), SUMIFS($J$2:J2, $A$2:A2, A2, $B$2:B2, B2), "")
This formula will give blank values until the formula finds a new client on a new date. However, I still think using pivot table is a better solution.
However, I still find the pivot table
In cell K2 put following formula:
=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,SUMIFS($J$2:$J$10,$A$2:$A$10,A2,$B$2:$B$10,B2),"")
Adjust row 10 value. It will be last row of your actual data.
Copy down as much you need.
EDIT
Uploaded file shows the cause behind formula not working correctly for you. It turned out to be whitespace characters in column B (names) data e.g.
Cell B3: "Moe John" has a trailing space.
Cell B10: Same case with "Doe Jane"
If you want to use above posted formula then all names shall be corrected. Or alternatively to deal with spaces you can adopt below approach.
=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,"*"&TRIM(B2)&"*")=1,SUMIFS($J$2:$J$28,$A$2:$A$28,A2,$B$2:$B$28,B2),"")
Notice the change in COUNTIFS formula where B2 is now replaced with "*"&TRIM(B2)&"*".
Even such formula will take a beating if you have uneven whitespace characters in between your data. I'd suggest normalizing it as much as possible.
this is my spreadsheet, i want to create a new sheet with the following aggregation: I have a table with date column and sum column. in the sum column I want to sum the quantity of each row the date appears. For example, for 7/5/2015 it will sum B4, B5, B10, B11, B15, B17, B22, B25, B29.
EDIT: My range should contain the whole sheet, from d to infinity and from 2 to infinity and I'm using google spreadsheet
I tried this formula, but it returns error:
=LOOKUP(A2,Sheet1,sum(!b))
please try the following:
=SUMIFS(B:B;F:F;"<>")
i hope this helps,
best - AB
Or you could try my favourite function, SUMPRODUCT :
=SUMPRODUCT(SIGN((F:F=$A$1)+(E:E=$A$1)+(D:D=$A$1))*B:B)
where $A$1 holds your lookup value, i.e. 7/5/2015
Should work for both googlesheets and excel.
Didn't try hard, but maybe this works too (adapt "AA" to your last column):
=SUMPRODUCT(D:AA=$A$1))*B:B)
You could even try to automatize the "AA" part with a =MAX(1:1) (what is the number of the last column in row 1?) coupled with the OFFSET function.
Explanations here:
Sumproduct - Multiple criteria with "or"
How would you find the biggest difference/change in values of a list of numbers in Excel?
An example of what I'm looking for is 1,3,4,5,9,10,11,13
The value I would look for is 4 as this is the biggest difference (between 5 and 9).
Is there a way to do this with a list in Excel?
A picture is worth a thousand words? :p
EDIT:
Description added:
As shown in the image, put the formula in =A2-A1 in Cell B2 and then drag it down. Once you have your values, use the Max formula to get the maximum value as shown in Cell D5
Add another column to contain the difference. Assuming your values are in column A, then the formula would be "=A2-A1" copied down the list. Few ways after this.
(1) You can eyeball which is largest
(2) you can copy values (make sure is values) to a this column and sort descending
(3) You can build pivot off that this column. and double click the largest to find the detail
If values are in distinct cells (A1:A8):
=MAX($A$2:$A$8-$A$1:$A$7)
seems to work (as an array formula, enter with Ctrl+Shift+Enter).
Put the values in a column.Say, Column A
In cell B1; write a formula. =A2-A1
Copy the same formula to the entire Column B, for every value in column A
Go to the end of column B, and write a new formula, =MAX (B1:B)
Create a new column with the differences:
=A2-A1
And drag down.
Find the max value:
=MAX(B1:B9)
Find the index of the max difference value:
=MATCH(MAX(B1:B9);B1:B9;0)