After doing a lot of research and trying various potential solutions, I am still stuck and hoping someone may be able to point me on the right track.
I am using a SUMIFS function in an Excel 2010 spreadsheet, but whilst it works when the reference spreadsheet is open, it gives a #VALUE error when the reference spreadsheet is closed.
My searching so far has identified that this is a known issue with Excel, but though I have tried various workarounds that are posted on forums, I haven't been able to make any work. I don't get a #VALUE error, but instead I get a zero.
The original formula is as follows:
=SUMIFS('P:\Performance\[All calls.xlsm]Jan 2016'!$N:$N,'P:\Performance\[All calls.xlsm]Jan 2016'!$R:$R,$B2,'P:\Performance\[All calls.xlsm]Jan 2016'!$G:$G,$C2,'P:\Performance\[All calls.xlsm]Jan 2016'!$J:$J,"pri")
As I say, this works fine when the other workbook is open (it obviously drops the "P:\Performance\" pre-fix), but not when it is closed (though it does change the reference to the full path).
So as per other suggestions, I have tried using SUMPRODUCT...
=SUMPRODUCT(--('P:\Performance\[All calls.xlsm]Jan 2016'!$R:$R=$B2),--('P:\Performance\[All calls.xlsm]Jan 2016'!$G:$G=$C2),--('P:\Performance\[All calls.xlsm]Jan 2016'!$J:$J="pri"),('P:\Performance\[All calls.xlsm]Jan 2016'!$N:$N)
However, this results in zero, which is clearly incorrect as the SUMIFS version and open workbook gives me a non-zero value.
Working through the calculation steps, I suspect it may have something to do with the reference cells themselves being based on formulae, but I'm not certain. Incidentally, I get the same result whether the reference workbook is open or closed.
Any ideas?
Thanks very much.
PS: I also looked at the Microsoft support site, but although it gives the impression that there is a workaround on the site, the hyperlink leads you back to the same place...
How to correct a #VALUE! error
OK, so first of all thanks to the two people who commented. I didn't need to take a look at the suggested "similar question", because I managed to resolve it myself.
The SUMPRODUCT solution posted elsewhere did in fact work. The issue turned out to be a strange situation with one of the columns I was referencing. On closer examination, I discovered that although the column was formatted as "short date", for some reason, some of the entries were not being recognised as such. I have no idea why this was, but when I converted the column to "number", it was obvious, as some of the dates failed to turn into date numbers. Strange, as all the entries were being created by a formula. So this was why the SUMPRODUCT formula was returning a zero very time.
Anyway, I found the solution here...
Some dates recognized as dates, some dates not recognized. Why?
I have no idea why this worked, but it did. And now the SUMPRODUCT workaround works, with the target spreadsheet closed. Maybe this will help someone else, or maybe it won't, but it does pay to check and double check the format of any cells you are referencing.
Related
Using excel 365. I have used this same formula for "asset allocations" and it worked perfectly.
I decided to do the same for sector allocation and I can not figure out what is wrong. This has beat me down. I have tried for 2 days. I thought that I could just exchange the category for sector. Didn't work. Thank you for any help.
Here is the image which shows the sheet that I am using.
The formula in G6 is:
=SUMPRODUCT(SUMIFS(INDIRECT(K$6:K$11&"[Value]"),INDIRECT(K$6:K$11&"[Sectors]"),[#Sector]))
You can see a REF Error on the column "Value".
This image is to show where the "Sectors" are listed on the individual sheets that I wish to sum.
Unusual, but this is working fine in my test scenario.
Use the Evaluate Formula tool to see where the error creeps in. You may have a typo in the list of tables.
I should have found the answer earlier but I didn't question my table columns.
In my last table the Column was accidentally called "Sector" and it should have been called "Sectors". I needed to pinpoint the point of problem by debugging better.
This code does indeed work fine for anyone wishing to sum by a category from more than one sheet. Not saying it is elegant code but it is easy to understand.
I'm admittedly new to using VLOOKUP in Excel, but I've run through a few tutorials on this and can't figure out what I'm doing wrong here. I'm attaching a sample of the table I'm working with, where I'm attempting to match a value (ZPOP) that is dependent on another value (ZIPCODE). The formula I'm using is
=VLOOKUP(A2,M:N,2,TRUE)
When I do the same as you, it looks like the formula is exact.
But, there's one thing in your Excel sheet: there is a warning at the beginning of your A-column. In order to reproduce this, I've replaced the value 59001 by '59001 (mind the single quote), and there the problem arises too.
Please check the warning of your A column and do some reformatting of that value, if possible.
I'll try and explain this as best as I can, it's a strange one so please bear with me. For the record I am using Excel 2010 (although I have seen this a couple of times before on previous versions also), and the model is fairly large (~30MB) containing around 20 sheets, and around 15 modules (although very well optimised and calculation times are non-existent).
I don't have the exact figures to hand, but for example in cells A1:A3 I have the values 823.50, -350.00, and -497.50 respectively. In cell B2, I am simply adding the values in column A by using =A1+A2+A3.
One would expect the result to show -24.00, but in fact shows something along the lines of 548.50.
Calculations are set to automatic
Application.ScreenUpdating = True
Formatting is set to General
Manually stepping through the 'evaluate formula' dialog returns the correct result right up until the last step, which then gives the incorrect result
This can be fixed manually by entering into the cell, and coming back out again (effectively F2 then enter), after which the cell shows the correct result.
It is definitely not just a visual error, as the incorrect result gets fed into other calculations. I know the quick fix is to F2 and enter each cell, but it was only by chance this morning that the error was spotted, and could have easily resulted in a very large, false cost.
Edit
Forgot to mention that this affected ~50 cells this morning, not just the one
Has anyone had any experience with this issue? Is it a known issue, and therefore a known solution?
Any help would be greatly appreciated.
The only things I've noticed was to use '=Sum' instead of just '=', but have never been sure it actually functions differently.
also, from MS: If an argument is a cell range or reference, only numeric values in the reference or range can be added
Afternoon all :)
This is kind of a little difficult to explain but ill happily clarify where ever it is needed. Thank you for taking the time to read this post ^^ Here goes..
I am currently creating a spreadsheet that is been extracted from the database whereby I am tasked to concatenate data from 2 adjacent cells. I change the database on a frequent basis adding or removing data wherever necessary so the range of data is always different. To concatenate the two cells I use the following formula:
e.g: =IF(ISBLANK(B8&H8),"",B8&H8)
This formula works out great when im dealing with increasing amounts of data as I can simply drag the formula down as far as i want and i know that it will pick up the formula whenever I refresh the database without the need of seeing value errors when the formula ends up referring to a blank cell. The snag here (and my query as well) is if I have less data then before the formula within the last set of cells looks something like this:
e.g: =IF(ISBLANK(#REF!&#REF!),"",#REF!&#REF!)
I have dealt with #REF before in other spreadsheets whereby I simply used a ISERROR in the statement but I dont know if there is a possible way of including this within my formula. I need the ISBLANK there so I have more control and dont have to drag the formula as often.
If there is a better way around this or a way to amend the current formula Id appreciate the help :)
The only way you are going to get something like this:
=IF(ISBLANK(#REF!&#REF!),"",#REF!&#REF!)
in the formula bar is if you(or the system you are using) are somehow deleting the cells that were originally referenced. This should be avoidable. You can clear the cells referenced instead of deleting them completely - then you won't get this error - and your formulas will remain intact. Now you can certainly use the formulas provided in the comments to hide the errors - but the root of your problem seems to me to be that the errors are occuring in the first place. Good Luck.
A client of mine has a major application written and running in excel 2003 ( I know, and they know, that it is a mistake, and they are waiting for it to be properly incorporated into their SAP application. They have been waiting for many years. ). Most of the time it works fine, however this week they had a problem, and the data was returning #value entries.
As I looking into this, I identified that a DSUM function was returning #value, which was then being spread across other places ( did I mention that there is no data verification in the VBA code? ) When I looked at the function, which is summing a column in a separate sheet, with a conditional, it identified a number of problems in the data, but even when I fixed them, and the Function analysis indicated no errors, it still returned #value.
I would post some of the code, but there is a 4700 row sheet involved, which is rather inpractical. Can anyone suggest what I might be able to do to progress this? Why is the DSUM returning #value problems, when there is no indication of any errors in the source sheet? I have searched through the column, and all of the values are valid numbers.
Sorry to be a little vague, but if anyone can give me suggestions as to how to progress, it would be appreciated. Excel and VBA are not my real specialities.
The only way I could get a #value was 3 fold:
If the criteria (the 3rd parameter) contained less that 2 cells.
If the data had a #VALUE in it that was propagated through.
Or if the first row of the database/table contained a value instead of text (even a number formatted as text fails in my example).
Do you still have the offending version of the spreadsheet? Might be worth ensuring the first row of data for errors particularly cells that look like text but have values in them (i.e., cell formatting can be used to display text even if there is a value in the cell, or if the first row is also calculated).
Hope this helps, and do let us know how you get on.
Dave