Unable to extend VLOOKUP formula - excel

A quick question on VLOOKUP.
I have two sheets ("Sheet2" acting as source or list of elements and "Sheet1" is where the VLOOKUP formula will be used)
I have created a name so that I can reuse the vlookup formula for A2 (Sheet1) also.
The issue is when I drag the formula to B2 in Sheet1 (where I want the VLOOKUP to be applied) it is showing me error and upon inspection I found that the variable I created "qw" is dynamically changing for every row.
See below :
QUESTION :
Can someone tell me how to apply VLOOKUP formula to B2 in Sheet1 ?.

While defining name range you should use the absolute reference for eg. If you want to set the name range to qw then its reference should be like =Sheet1!$A$1:$C$4 which means range get fixed. And if you drag the formula it will refer to same range

Related

How to create an offset formula to use the reference in a cell (the cell the formula points to), not the cell address the formula is in?

I thought this would be easy, but haven't figured it out on my own or found an existing answer online.
I have a worksheet set up to create charts from the contents of certain cells in a table. I'd like to be able to point one cell to a value in another worksheet and have all the related cell populate with the values using the formula in the one cell as an address reference.
For example, if I put the formula ='Source Data'!G19 in cell E3, I would like cell E4 below it to act like it has the formula ='Source Data'!G20 (one row below in the Source Data worksheet) and populate that value while cell F3 to the right would act like it had the formula ='Source Data'!H20 in it. So the new worksheet would just mirror the table of data from the Source Data worksheet for as many columns or rows as I need.
I'd tried to figure this out with offset, indirect, match and address functions, but have failed.
It is important to note that the formula needs to be able to identify the actual cell address, not just match the value from the formula because the same values show up multiple times in the Source Data worksheet.
Any help or direction is greatly appreciated.
Here's my approach:
I have a workbook with 2 spreadsheets Source Data and Results, on Source Data, I have the "Static" table that contains all my values from A1 to D12(This can be any number of cells, as long as you use an equal range in the Results sheet).
On Results, Cell A1 is reserved for the "guide" cell from Source Data, written in the following format: ''Source Data'!A1 (note the two single quotes at the begging). I chose to start at Cell B2 on the Results sheet, you can switch the formula however you like.
The desired result is achieved by using the following formula on B2:
=IF(CELL("contents",OFFSET(INDIRECT($A$1),ROW(B2)-2,COLUMN(B2)-2))<>0,CELL("contents",OFFSET(INDIRECT($A$1),ROW(B2)-2,COLUMN(B2)-2)),"")
then drag down and to the right the same number of maximum cells that exist on Source Data and the result will adjust accordingly.
I prepared a Google Sheets document with all of the information.

Hlookup to get the value of the entire row

I am trying to use Hlookup to get the value of the entire row and show blank if not found from worksheet 1 to worksheet 2
I was trying to use this formula
=IFERROR(HLOOKUP(A1,Sheet1!1:2,2,0),"")
but this formula doesn't allow me to drag it down
I would suggest you need :
=IFERROR(HLOOKUP(A$1,Sheet1!$A$1:$I$4,ROW(A2),0),"")
Put that in A2 then drag that down (and across if you need)...

Reference a cell based on another cell's cell reference

Is there anything that acts like =CELL("contents",A2) except returns the formula from A2 instead of the contents from A2?
I want to use a formula from one cell to build a similar formula in another cell.
A2 currently contains the formula =Tests!B1
I want to build a new formula that strips out the B and uses another cells data in my Results worksheet to create a new formula that pulls related data from Tests.
What version of Excel? 2013+ has FormulaText(...)
https://support.office.com/en-us/Article/FORMULATEXT-function-0a786771-54fd-4ae2-96ee-09cda35439c8
If not, check out this question's answer.

Google Docs - Reference a sheet from cell value

I have a column of "sheet names" and I need to use it to reference the sheets in a formula where I use an interval from these sheets.
How can I do it ?
I found something about indirect() but it seems restricted for single cell reference only.
Thank you
Indirect is not only for single cell reference.
You need it to be typed out like this (if we say you want A1:B10 in Sheet2 when you are in Sheet1):
Sheet2!A1:B10 (in A1), dont use '' around the reference.
=indirect(A1) would then type out the entire range A1:B10 from Sheet2.

What does an exclamation mark before a cell reference mean?

In a text about Excel I have read the following:
=SUM(!B1:!K1)
when defining a name for a cell and this was entered into the Refers To field.
What does this mean?
When entered as the reference of a Named range, it refers to range on the sheet the named range is used on.
For example, create a named range MyName refering to =SUM(!B1:!K1)
Place a formula on Sheet1 =MyName. This will sum Sheet1!B1:K1
Now place the same formula (=MyName) on Sheet2. That formula will sum Sheet2!B1:K1
Note: (as pnuts commented) this and the regular SheetName!B1:K1 format are relative, so reference different cells as the =MyName formula is entered into different cells.
If you use that forumla in the name manager you are creating a dynamic range which uses "this sheet" in place of a specific sheet.
As Jerry says, Sheet1!A1 refers to cell A1 on Sheet1. If you create a named range and omit the Sheet1 part you will reference cell A1 on the currently active sheet. (omitting the sheet reference and using it in a cell formula will error).
edit: my bad, I was using $A$1 which will lock it to the A1 cell as above, thanks pnuts :p

Resources