Using SUMIF with INDIRECT - excel-formula

Values are in another sheet which is named as cell value"A3"
=SUMIF(INDIRECT(" ' "&A3&" '$B:$B"),D$2,INDIRECT(" ' "&A3&" '!$M:$M"))
do you see anything wrong with this formula ?
doesn't work #REF! is the response.

By enclosing A3 in ampersands you are referencing cell A3 in the current sheet. What you want is:
=SUMIF(INDIRECT("'A3'!$B:$B"),D$2,INDIRECT("'A3'!$M:$M"))
On second look, if you are intending to reference a sheet that is named what you have in cell A3 then you don't need the apostrophes around the cell reference:
=SUMIF(INDIRECT(A3&"!$B:$B"),D$2,INDIRECT(A3&"!$M:$M"))

Related

How to link a cell to sheet reference

If I type Sheet2!A3 in A1 Cell of Sheet1, it will show the value of A3 cell of Sheet2. But I want to use this reference link from a cell in Sheet1
Please, look at the snapshot. I want to use the C1 cell to get the Sheet2 part of Sheet2!A3. So If I change the value of C1 from Sheet2 to Sheet3, then the formula in A1 will be changed to Sheet3!A3.
How to achieve this?
Try: =INDIRECT($C$1&"!A" & ROW() + 2)
This will mean you can have any sheet name in C1, and it should be able to get whatever cell you specify in the quotes (don't forget the exclamation mark!)
EDIT: Sorry, I missed that part, I've updated it now and it should work to increment.
You can add in another cell to make things simpler
In Sheet2 A3 i have the Value 10
And these formula Get that value with just some simple Indirect reference
If you want to make A3 Dynamic as well then :
The Aim is to get a cell which constructs the name of the cell/s you want to reference and then you can indirect Reference them accordingly.

Excel - Does a range of cells contain a value in a list?

I want to answer - does a range of cells (A1:E1) contain any value from a list (G1:G50)
In other words: Does A1 OR B1 OR C1 OR D1 OR E1 contain any value that appears in G1:G50
This formula might give you the result you want:
=SUM(IFERROR(MATCH(A1:E1,G1:G50,0),0))>0
You have to make it an array formula. That means after typing or pasting this formula into you target cell you have to commit it not as usual with simple 'Return' but by 'Ctrl+Shift+Return'. If you did it right the formula will be surrounded by curled brackets in formula bar.
You can use COUNTIF within SUMPRODUCT like this
=SUMPRODUCT(0+(COUNTIF(A1:E1,G1:G50)>0))>0
That doesn't need "array entry"

Indirect formula to increment cell the cell AND the column?

I have a worksheet name in cell C11 which I am referencing in a formula with a =INDIRECT formula.
I have also added the =ROW formula so that it increments the row number when I drag it down my worksheet.
My formula looks like this: =INDIRECT("'"&$C$11&"'!C"&ROW(C12))
How can I modify it so it also increments the column when I drag it right?
I've tried to use the =column method, but I assume I am doing something wrong as I just get a reference error, can anybody assist?
Column() returns the Column number, so you may use the R1C1 variant of INDIRECT.
=INDIRECT("'"&$C$11&"'!R"&ROW(C12)&"C"&COLUMN(C12),FALSE)
Greetings
Axel
A bit long, but working. Assume A2 has the =Column(A1) formula for the whole row.
Isert into A3 and copy to the while row:
=IF(A2>26,CHAR(64+ROUNDDOWN((A2+1)/26,0))&CHAR(64+A2-26*ROUNDDOWN((A2+1)/26,0)),CHAR(64+A2-26*ROUNDDOWN((A2-1)/26,0)))
This works only for the one and two letter columns. You can expand if you need after ZZ column.

Using Wildcard in If Statement with Cell Reference

I'm building a worksheet that will concatenate cells based off of criteria in another column on the same row. After much searching I found Harlan Groves aconcat UDF and this is the formula I've got so far:
=SUBSTITUTE(aconcat(IF(Labor!$A$8:$A$100=A2," "&Labor!$M$8:$M$100," "))," ","",1)
Labor!A8:A100 looks like this:
115012ABCD
115013ZYWX
115014WASD
121018ABCD
121018WASD
Cell A2 = 115
Cell B2 has the formula above.
I'm trying to concatenate a summary of all cells that start with the first three digits of the number in Labor!A8:A100. I've got the formula mostly working but my cell reference (A2) is causing me issues. If I use the exact match (e.g. 115012ABCD) in cell A2, my formula works. Otherwise it returns no data.
How can I tell Excel to find values that start with the digits in cell A2 rather than have to be an exact match with cell A2?

Excel formula to find reference used by other cell

Is there a way to find out the address of the cell being referenced in another cell in excel?
E.g. cell C1 contains formula =max(A:A) and returns a value of 10 which is actually referenced to cell A10. Can I use a formula in cell B that returns 'A10'?
And no, I don't want to use VBA at all.
Assuming that your entries are in Cells A1:A7, you can do it this way ...
In Cell B1, the formula =MAX(A1:A7) and
in Cell B2, the cell location of the maximum number in the range (shown in B1) is given by the formula
=CELL("address",INDEX(A1:A7,MATCH(MAX(A1:A7),A1:A7,0)))
OR
=ADDRESS(MATCH(MAX(A1:A7),$A$1:A7,0),1)
Mark as answer if it helps.
Managed to find the solution:
Similar to Kyle's formula, but instead we use match with multiple criteria to be more specific e.g.
=ADDRESS(MATCH(MAX(A1:A7)&"A",$A$1:A7&$B$1:$B$7,0),1)

Resources