'{=IFERROR(INDEX(indirect("'"&$B$1&"'!E$8:E$105),MATCH(1,((COUNTIF(D2:D$2,indirect("'"&$B$1&"'!E$8:E$105))=0)*(COUNTIF(indirect("'"&$B$1&"'!E$8:E$105),indirect("'"&$B$1&"'!E$8:E$105))>=2)),0)),"")}'
I've tried using the above formula to list duplicate values in one sheet by searching whichever sheet name is in Cell B1. The above won't work, but I'm unsure as to why? Is it the syntax, or something else?
Any input would be greatly appreciated.
The quotes are a bit out of whack in the indirect functions
indirect("'"&$B$1&"'!E$8:E$105) should be INDIRECT($B$1&"!E$8:E$105",1)
It works for me after fixxing that, then deleting the dynamic range marks i.e. '{}' , and finally changing the format of the cell to general
Related
I have a formula that sums one column based on a criteria from another column. This formula works fine:
=SUM(SUMIFS(sheet1!C:C,sheet1!A:A,{1, 7}))
However, i need to be able to use a cell reference which will contain the {1, 7}
So the formula will look like this:
=SUM(SUMIFS(sheet1!C:C,sheet1!A:A,M2))
But this returns a zero, when evaluting the formula it pulls the contents from the cell but wraps it in "" which i think is where the issue is happening.
I've tried adding formula to remove the quotes, and trying to pull the contents differently, but still the same.
Any help would be greatly appreciated.
Figured out a way round this.
I created a named range called condition, and assigned =Evaluate($M2).
Then I used this formula =SUMPRODUCT(SUMIFS(sheet1!C:C,sheet1!A:A,Condition))
This picks up all numbers used in M2, and works on all rows below with the Evaluate formula following.
Thank you to everyone that assisted with this.
This link helped aswell: Excel SUM of SUMIF/SUMIFS with dynamic multiple criteria
I'm looking for any documentation or explanation for something that happens in Excel and I think it's a bug, unless somebody can throw some light in this.
Recreate this fail is very easy:
The above data is in a worksheet named Hoja1.
First column are typed values.
Second column is a formula like this: =Hoja1!A2 and drag down
Third column is a formula like this: =A2 and drag down.
I know the formula in second column wouldn't be the proper way (no need to reference the worksheet name if you are referencing cells in same worksheet), but it's needed to check this behaviour.
Now, just sort data using first column as criteria (order from min to max). I was expecting formulas would still show the most left cell value, but see what happens:
I was not expecting that at all. I tought that because I've used relative references in =Hoja1!A2, it would be increasing row number. but not at all. Formulas look like this:
Solution to this is easy, I must use clearly notation excluding worksheet name when referencing cells in same worksheet, but this behaviour is wrong for me.
I've search on Google, Microsoft Forums and also SO and found nothing about this behaviour when referencing cells in same worksheet using worksheet name.
As I said, I know the solution, but I was expecting somebody share any info about this issue.
That's all. Thanks in advance.
This is a known bug/feature/"by design" - eg see:
https://answers.microsoft.com/en-us/msoffice/forum/all/excel-table-with-formulas-wont-sort-properly/56a70898-bee5-4226-8d96-72f05f49eb11
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.
I'm making multiple IF statements that are going to have the same layout. Instead of writing the reference sheet name I'd like to reference a cell for the sheet name.
Also in the interests of laziness I'd like to drag the formula so it changes locations it is looking at on the referenced sheet.
At the moment it looks like this.
=IF(sheet1!O2="","",sheet1!O2)
Simple enough.
However I want to use indirect and I can't write it without getting an error.
Last attempt was
=IF((indirect($B$3))!O2="","",(indirect($B$3))!O2)
where Sheet1 is in the cell B3
Doesn't work.
Any help on the correct syntax would be very appreciated.
You need to concatenate $B$3 and "!O2" to generate "Sheet1!O2" as a string for INDIRECT to work, as below:
=IF(indirect($B$3&"!O2")="","",indirect($B$3&"!O2")
So, what I need is to show SUMPRODUCT of two cell ranges? Both of these cell ranges, that is, each cell contains formula in it. From this formulas I get some number in the cells. This is the way I'm doing it right now:
=SUMPRODUCT((S7:S1000)*(T7:T1000))
and because of formulas I get error A value used in the formula if of the wrong data type
How could I solve this problem? Is there some kind of way to read just number in the cell and not the formula?
Thanks
Replace the "*" with a comma (",").
I've had so much problems with this and in the end it was that instead of comma(",") I needed to use semicolon(";"). Maybe its up to Excel version, I'm using 2010?! So, solution was:
=SUMPRODUCT(S7:S1000;T7:T1000)