Copy cell info with variable - excel

I need to pull data from a cell on another sheet (Sheet1), using a variable on the Current sheet (Sheet2, 3, 4 etc)
..ie I have a formula that takes the current sheet name and returns a value in a cell (A1 on current sheet),
I then need to go to a specific Column on another sheet but using the Row as derived from the sheet name something along the lines of:-
=Sheet1!H(Sheet2!A1)
where H is the column and (Sheet2!A1) is the row, and A1 holds the value of the current sheet name

Take a look at the Excel INDIRECT function, it might do what you're looking for. It takes a string (which you can build) and used the value of the string to make a cell reference.
http://office.microsoft.com/en-001/excel-help/indirect-HP005209139.aspx

Related

Reference a filename from another cell in Excel [duplicate]

I am trying to use the indirect function in Excel to build a formula to return a value on another sheet.
On Sheet A cell D3 has the value B
I want to use the value B to return a value from cell B6 in a Sheet called App Summary.
I tired the below formula on Sheet A:
="'App Summary'!"&Indirect("D3") & 6
This return the string 'App Summary'!B6.
How do I get it to calculate so that is returns the value in cell B6 from the App Summary Sheet?
I usually put the whole statement in the Indirect() function and use '&' to connect parts that are direct quotes with parts that are dynamic.
Example: =INDIRECT("'Workbook A'!A"&A1) will return the value in 'Workbook A'! that is located in column A, at the row indicated by the number in the current sheet's A1. If A1 is 1, this will return the value in 'Workbook A'!A1.
You might try =Indirect("'App Summary'!"&D3&"6"). I'm assuming you want to use a column from another sheet who's value is stored in D3 of the current sheet and look in the 6th row on the Summary sheet.

Using an IF function to refer to separate sheet

[EXCEL] I am looking for a way use an IF function that refers to a column that is referring to a sheet.
EX:
NOTE: yellow box is what I want to have happen using the function
The ID column is populated from a separate sheet in my workbook
Formula:
=Sheet2!$A$3:$A$48
=Sheet3!$A$3:$A$48
I want the Flag column to refer to the ID column from the other worksheet. In pseudocode:
"If ID field references the Sheet2 Range, return value 1, ELSE, return 0".
Building on #BigBen's comment try this:
=IF(ISNUMBER(SEARCH("Sheet2",FORMULATEXT(A2))),1,0)
replace A2 with cell reference that matches the location of ID # 123456 in your spreadsheet, and then drag the formula down.

Reference other cells based on value from dropdown list

I have a sheet in which I store information about many variables (call this the reference sheet). I then have another sheet where I want to populate a column based on IDs from this other sheet, and then reference the other columns in the sheet depending on which ID is selected (either directly by pulling the values in - this may be easiest, or indirectly by using the values in a formula).
Example:
Reference Sheet:
What I'd like to create:
Where the id "C" was created using Data Validation from the Reference Sheet ID column. What I want is for Var1 - Var3 to be created by referring to the row in the reference sheet corresponding to "C". Alternatively, a calculation (in this case it's the sum of var 1 + var 2 divided by var 3) based on these values could be done in this sheet. Note: for this example, I just copied the output I want - but I do not know how to create this dynamically (which is my question).
Is this something that is possible in Excel? If so, how would I do that?
Assuming that the reference sheet is called sheet1, you can put this formula in the other sheet (in cell B2): =INDEX(Sheet1!$B$2:$D$6,MATCH($A2,Sheet1!$A$2:$A$6,0),MATCH(B$1,Sheet1!$B$1:$D$1,0)). Use the fill handle to copy the formula to the cells to the right (until D2).
And this formula in cell E2: =(B2+C2)/D2.

Indirect Function to Build Excel Formula

I am trying to use the indirect function in Excel to build a formula to return a value on another sheet.
On Sheet A cell D3 has the value B
I want to use the value B to return a value from cell B6 in a Sheet called App Summary.
I tired the below formula on Sheet A:
="'App Summary'!"&Indirect("D3") & 6
This return the string 'App Summary'!B6.
How do I get it to calculate so that is returns the value in cell B6 from the App Summary Sheet?
I usually put the whole statement in the Indirect() function and use '&' to connect parts that are direct quotes with parts that are dynamic.
Example: =INDIRECT("'Workbook A'!A"&A1) will return the value in 'Workbook A'! that is located in column A, at the row indicated by the number in the current sheet's A1. If A1 is 1, this will return the value in 'Workbook A'!A1.
You might try =Indirect("'App Summary'!"&D3&"6"). I'm assuming you want to use a column from another sheet who's value is stored in D3 of the current sheet and look in the 6th row on the Summary sheet.

How do I automatically update cells to match values from another sheet when one cell is changed using data validation?

I have a list of items on Sheet 1 with the names of each item in column A and then further information in the subsequent 5 columns.
On Sheet 2, in each of the cells of column A, I have set it so that I can pick any item from a dropdown list using data validation. I want the subsequent cells in the row to automatically assume the value of the respective cells in Sheet 1.
So if in Sheet 2, Cell A1 I select Item 3 (which is in Cell A3 on Sheet one), I want Cell B1 on Sheet 2 to have the same value as Cell B3 on Sheet 1.
I could get the result I wanted by using =IF($A3='Sheet1'!A3,'Sheet1'!B3,) and then adding each possible item but that seems really long winded and would require adding to the formula every time I added an item.
Any idea if there is a way of doing this? Sorry if my explanation is a bit confusing. My excel knowledge is not great!!
Thanks in advance
Use the Vlookup function
Next to your data validation cell, enter (assuming the first sheet called Sheet1):
=Vlookup(a1,Sheet1!a:f,2,0)
This will return the data that match for the 2nd column. For the 3rd use:
=Vlookup(a1,Sheet1!a:f,3,0)
And so on..

Resources