I have used the formula sumifs in order to calculate the sum of values in a column ranging between, e.g., 100 and 1000, located in a different workbook. The problem is that when I close that excel workbook the formula in my first excel file doesn't work anymore and #value appears. I would like to find an alternative formula/solution to this, and I have already looked online, but I don't seem to be able to find a proper solution. For instance, I could use sumproduct, but as a result I only get a count of the values satisfying the conditions and not the sum of them. Could you help me?
Thanks.
Giulio
There are a few functions which do not work when the source data file is closed. They are:
SUMIF(), COUNTIF(), AVERAGEIF(), OFFSET(), INDIRECT(), GETPIVOTDATA(), SUMIFS(), COUNTIFS(), AVERAGEIFS().
You will have to write alternative formulas in those cells or have the source data in the file that is doing the calculation
Related
So, what I have is an excel sheet that is automatically generated by a program, so reformat is not an option:
Example Worksheet
General format of this excel will stay the same, with some additional rows depending on the day.
I’m trying to create a formula that I will use from another worksheet (I can handle linking from another workbook) that will give the total number of Boxes for that day.
For example, the correct answer for this day would be 85.
I have tried a few formulas but they have not worked for me.. I am most likely missing something. I tried getting all numbers relative to the “Totals:” cells, and just distinguishing the “* Box” columns with SUMIF but that didn’t work either.
Ideally: Have the formula look at cells in the same row as the “Totals:” rows(blue), but only in the Box Columns(orange) to pinpoint all the (green) cells and add them all up for a grand total.
Colors were just added for visual reference.
Any help is appreciated.
Try this. There may be a way to make it more compact, but I have tested and this works if your columns do not change
=SUMIF(A:A,"Totals:",I:I)+SUMIF(A:A,"Totals:",K:K)+SUMIF(A:A,"Totals:",M:M)+SUMIF(A:A,"Totals:",O:O)+SUMIF(A:A,"Totals:",Q:Q)+SUMIF(A:A,"Totals:",S:S)
After a quick test something this might work (as an array formula):
I have a data sheet that contains 9 columns corresponding to a name. But the names are repeated. So I want to create new sheets for all names and filter their data from the data sheet. The sheets must be updated when any changes are made on the data sheet.
I tried VLOOKUP but had some various problems, and it didn't work well for me. I've found a way that may help, but it's prepared for Excel. ( https://fiveminutelessons.com/learn-microsoft-excel/use-index-lookup-multiple-values-list )
In OpenOffice ROW(1:1) doesn't give a result. Dragging as an array also doesn't change the cells in the formula. So are there any alternative ways to solve this problem? (OpenOffice solutions are preferred).
The example from the link in the question almost works in LibreOffice. To fix it, instead of ROW(1:1), use ROW($A$1:$A$6).
I am not sure what ROW(1:1) does in Excel, and I could not find an explanation online. In Calc, ROW($A$1:$A$6) returns an array of 1 column x 6 rows: {1;2;3;4;5;6}.
So here is the full formula using the example.
=IF(ISERROR(INDEX($A$2:$C$7,SMALL(IF($A$2:$A$7=$A$9,ROW($A$2:$A$7)),ROW($A$1:$A$6))-1,3)),"",INDEX($A$2:$C$7,SMALL(IF($A$2:$A$7=$A$9,ROW($A$2:$A$7)),ROW($A$1:$A$6))-1,3))
Be sure to enter it as an array formula with Ctrl+Shift+Enter
I have a function here that is meant to calculate how many leads I have in each country.
=sumproduct($A2=(vlookup(id_leads!$A:$A,country_leads!$A:$B,2,0)))
On sheet id_leads,$A:$A contains the lead ids
On sheet country_leads Column A contains the lead ids. Column B contains the country of which the lead is located.
Can someone explain why it fails in Excel (I get a #VALUE! error), but works fine in Google Sheets? A suggestion to make this formula work in Excel would be appreciated. I've tried to use COUNTIF and SUMIF, but couldn't figure it out.
Thanks in advance!
You need to use COUNTIFS() wrap by SUM() in an array formula, something like:
=SUM(COUNTIFS(D:D,B1:B3,E:E,A1))
Being an array it needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode. If done correctly then Excel will put {} around the formula.
Note the 2nd and 4th criteria need to be limited to the data set and not a full column reference.
So your formula would be something like this:
=SUM(COUNTIFS(country_leads!$A:$A,id_leads!$A1:$A100,country_leads!$B:$B,$A1))
I have an Excel formula which references several cells in other files, of the format:
=COUNTIFS('[FILE1.xlsx]Sheet 1'!$D$2:$D$5000,"A",'[FILE1.xlsx]Sheet 2'!$H$2:$H$5000,"B")
When I open this file, the cell value defaults to #VALUE (if FILE1.xlsx is closed).
Searching Microsoft Support (https://support.microsoft.com/en-us/kb/260415) this is because formulas such as SUMIF, SUMIFS, COUNTIF, COUNTIFS or COUNTBLANK automatically calculate on spreadsheet opening.
Microsoft's workaround is to replace COUNTIF with SUM(IF(Range=Condition,1,0) entered as an array. (There is no example for COUNTIFS.)
My question is: How do I change my formula to be of the format SUM(IF (AND?) ?
(I do not want my formula trying to recalculate if I open the spreadsheet with the source file closed.)
I've tried =SUM(IF(AND('[FILE1.xlsx]Sheet 1'!$D$2:$D$5000="A",'[FILE1.xlsx]Sheet 2'!$H$2:$H$5000="B"),1,0)) (as an array)
But this returns 0.
Any thoughts?
(Or must I revert to a clunky 3rd column in my source spreadsheet containing the COUNTIF logic so my file can just use SUM instead ...?)
The array equivalent to your COUNTIFS would be:
{=SUM(IF(('[FILE1.xlsx]Sheet 1'!$D$2:$D$5000="A")*('[FILE1.xlsx]Sheet 2'!$H$2:$H$5000="B"),1,0))}
But
=SUMPRODUCT(('[FILE1.xlsx]Sheet 1'!$D$2:$D$5000="A")*('[FILE1.xlsx]Sheet 2'!$H$2:$H$5000="B"))
should also work.
I am creating a work chart for a project with excel table. However with so many people to manage I have ran into an issue of often putting same person twice on different columns of the same row (he/she can't work on two places at same time!)
So, I am looking for help with a formula that notices if the same name appears twice on a row but does not count multiple blank cells as duplicates. My understanding of excel is very basic and so far I have managed to get this far
=COUNTIF(A6:W6;A6:W6)=1
which returns to me with false, which I assume is because of the blank, unfilled cells still within the table being counted as duplicates.
Help would be appreciated, thanks.
You can't have a range as the second argument of a Countif. The range you pass into the formula will resolve to just the first value. Use the Evaluate Formula tool to see what I mean.
If you want to determine if ANY name in the range A1:W1 appears more than once (and exclude blanks), you will need a recursive function. That can only be done with VBA, not with a formula.
You could use a Countif in a conditional format to highlight duplicate names in a row. That's a piece of cake. Pipe up if you want to do that.