Indirect call of a column from different sheet - excel

I know how to use the indirect formula in a sheet itself.
=INDIRECT(CHAR(ROW(A5))&ROW(A5))
However, I am having hard time manipulating this to find a formula from different sheet called 'sheet1'
I am trying to retrieve value in B3 of Sheet1 using indirect formula. Any help is appreciated.
Please note, going forward (I plan to drag this formula down) I plan to manipulate rows and columns so I do want both of them (rows and columns) as variable values.
Eg: NOT indirect('Sheet1'!B3) but rather something like indirect('Sheet1!'&char(row(a5))...etc) which is not working for me.
Thanks for the help!

=INDIRECT(CHAR(ROW(A5))&ROW(A5)) just returns #REF
do not use something like CHAR() to build a "A1" address. Better use R1C1:
=INDIRECT("'Sheet1'!R3C2",0)
to make the row dragable:
=INDIRECT("'Sheet1'!R"&ROW()&"C2",0)
or to fit the columns:
=INDIRECT("'Sheet1'!R3C"&COLUMN(),0)
or for both:
=INDIRECT("'Sheet1'!R"&ROW()&"C"&COLUMN(),0)

Related

Excel Sumifs with multiple arrays referenced on another cell

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

Excel formula checklist in employees

I want to know about this Excel formula and how it works
IFERROR(COUNTIF(OFFSET(T_E[[#Headers],[EMPLOYEE NAME]],MATCH(I_E,L_E,0),MATCH("ACT 1 DT",L_H,0)-1,1,N_S),">0")&" / "&N_S,"")
Please tell me about this formula and how can I change this by adding or removing.
The best for trying how function works is to try it in excel, but still...
You want to know what the whole function works or just how partial functions work?
In general, the function addresses to formatted table and to named parts of the table, so it should return value from formatted table, that is x rows from employee name in row and x columns from employee name in this row.
How many depends on what is under "I_E", "L_E" and "L_H" and "N_S", I cannot tell without this knowledge.
How to evaluate a formula
If you would like to better understand how a complex formula works, use the Formula Evaluator in Excel. Therefore select the cell that contains the formula, and on the Formulas tab, in the Formula Auditing group, click Evaluate Formula.
Also there is a documentation for all formula functions. With this and the Formula Evaluator you should be able to trace what the formula does.

Best function to get a cell from the same row as another cell on a separate sheet

What is the best function to get a cell from the same row as another cell on a separate sheet. On sheet 1, A2 is a lead id and B2 is a name. On sheet 2, if I put in the lead id on A2, I want the name to autopopulate in B2. The function I used is =IF(A2=Leads!A:A,Leads!B:B," ") Now, it works fine with my first two leads but then it returns the false value on all the others. It has worked a couple times but it seems really glitchy. Any better way to accomplish this?
I think you should be able to use a vlookup function for this. Try putting the following formula into Sheet2 cell B2:
=VLOOKUP(A2,Sheet1!A:B,2,FALSE)
vlookup will work (Chris Moore answered with this)
Personally I prefer using index/match because if you alter the structure of the sheet by inserting or removing columns the formula adapts better and also because index match can lookup columns in any order and uses more precise ranges
=INDEX(Sheet1!B:B,MATCH(Sheet2!A2,Sheet1!A:A,0))
For a more in-depth explanation there is one here: https://www.deskbright.com/excel/using-index-match/

How do I use the result of one function in another function to get the value stored in a cell in another sheet in Excel?

In my current sheet I have some numbers in a column, which represent the row which I want to get the data from in another sheet. And I want to get it from the same column in which I am using the function...
I know using =Sheet1!A1 for instance gets me what is in A1 on Sheet1
and
=CONCATENATE("A",A1) being on sheet two, brings me back A + whatever value is stored in A1 on sheet number two... for simplicity let's say it's a one... so it would return A1
I am on Sheet2
I'm trying
=Sheet1!CONCATENATE("A", A1)
but the formula contains an error, I've tried rewriting this in many ways but it never works... any idea what the correct syntax I need is?
Greatly appreciated!
THanks
As Magicianeer said, you have to use the INDIRECT function. For your example:
=INDIRECT(CONCATENATE("Sheet1!","A",A1))
Should give the results you need.
However, it's a bit lengthy, and you can use & instead of CONCATENATE, and you can directly use Sheet1!A:
=INDIRECT("Sheet1!A"&A1)
What is evaluated in the brackets is Sheet1!A1, and INDIRECT converts this from text to a reference.
Try:
=CONCATENATE("A", Sheet1!A1)

Use cell text to build Excel formula

I'm trying to utilize a row and a column header to build a function that I can fill across an excel table (range of cells, not excel table object). So, for example I have a row header "BAT61" and column headers "A","B","C"...
I'd like to create a formula that generates the following results in those columns: =min(BAT61A),=min(BAT61B), =min(BAT61C)... Where those generated names match named ranges that have already been created.
I've attempted to use =index without success (I generally get a #ref error). I'd prefer a non-vba solution, if at all possible. Any help is appreciated.
UPDATE:
I've tried the indirect function but gotten the same #ref error. I've verified that the named range exactly matches the text string I'm trying to pass. I've tried the following variations with the same result #ref: =min(indirect(A1))[where A1 is the cell with "BAT61A"], =min(indirect(BAT61A))[to try and get the result directly], and =min(indirect(A1&A2))[where A1="BAT61" and A2="A"]. But, when I create a "Test" range, like suggested-it works. Any further ideas would be appreciated.
UPDATE2: I was able to get it working with several slight modifications. My named ranges that did't work were actually referring to fairly extensive array formulas that were parsing select rows from a table. When I created new dummy columns in the table that basically did the filtering, the indirect would pull the correct columns based upon the indirect.
Name some cells "Test" then you can use:
=MIN(INDIRECT("Test"))
http://www.cpearson.com/excel/indirect.htm
The name can be constructed using the & operator = $A1&B$2
For reference of others, use the function "Address" and "Indirect" in combination to achieve the above behavior.
Here is a sample for using values in cells to create formulas
=INDIRECT(ADDRESS(E6,K2))
Assuming cell
E6 holds 3 and
K2 holds 4
The above formula will return
=INDIRECT($C$4)
Assuming cell
C4 holds This is a test
The above formula will return
This is a test

Resources