I have different spreadsheets (on the following photo, from 1 to 25);
They have the same layout ( Photo here ).
I want to create a table with the E7 cell of each spreadsheet (A table of every "Total").
I tried this by extanding the formula...sounds good, doesn't work.
Put this in the first cell:
=INDIRECT("'" & ROW(1:1) & "'!E7")
And copy down.
If you put the following formula in the first 25 rows of your target sheet, it should do what you're trying to do:
=INDIRECT(ADDRESS(7,5,1,1,ROW()))
ADDRESS is formatting an address based on the parameters provided.
7 is the row
5 is the column (Column E)
1 says use an absolute reference $E$7
1 says us the A1 style address, not the R1C1 style.
ROW() says use the sheet having the same name as the row where the column appears. So, in row 1, it will use sheet named "1". In row 8, it will use the sheet named "8"
INDIRECT says to get the value from the provided address.
If you need to put the list in a set of rows farther down the sheet, just use ROW()-N where N is one less than the number of rows from the where your list starts. So, if your list of totals starts in row 3, use ROW()-2.
Related
I am using 2 spreadsheets. Sheet1 -Return Codes needs the values from Sheet 2- GL Interfaces. I am trying to match with column 1 on sheet 1 to sheet 2 in order to bring back the correct Name associated with an application ID.
The formula displays in the cell instead of the value replacing the formula:
=VLOOKUP(A2,'GL Interfaces'!A2:F61,2,False). What is wrong with my formula for this simple lookup?
I click in the column where I want the value to return to.
Click Formula | select Vlookup.
Click on A2 (the column with the application numbers) on sheet 1
Go to second sheet and highlight array that I want to be searched.
Put in 2 as a column with the Names (col index num) that I want to be searched on the second sheet
Enter False for the last entry (Range_Lookup)
Enter and only the formal displays in the cell I want a Name to appear.
What am I doing wrong?
=VLOOKUP(A2, 'GL Interfaces'!A2:F61, 2, false)
is a valid formula. make sure that the first column of the 2nd argument of vlookup is the one that contains the value from the first argument of vlookup. in other words: A2 needs to be found in A column of sheet GL Interfaces and if there is a row with a match, then return value from B column of GL Interfaces sheet
A list of names (Sheet "Name") which need to put on the following sheet in 5 (preferably variable number) row gaps.
A3 = Name!A1
A9 = Name!A2
A15 = Name!A3
A21 = Name!A4
I've tried using the ROW() in conjunction with IF/THEN/ELSE condition loop,checking for blank row, which fell short. More googling has lead me to the the offset() operand but that's accessing cells rather than writing in them.
I'm quite happy to use VBA active cell but the VB editor doesn't work properly on this machine so for the time being i'm trying to solve this task using EXCEL.
Ooption A:
Put this formula into A3,
=INDEX(Name!A:A, INT(ROW()/6)+1)
Copy to A9, A15 and A21.
Option B:
Put this formula into A3,
=IF(NOT(MOD(ROW()-3, 6)), INDEX(Name!A:A, INT(ROW()/6)+1), "")
Fill down to A21.
Alternatively, you can offset based on the number of rows you've already filled.
=OFFSET(Name!$A$1,counta(A$1:A2),0)
This will work as long as there is no content within other rows between A3,A9,A15,A21.
A little more dynamic would be to add a reference row in the Name tab that would allow you to do a VLOOKUP/MATCH/etc within the new tab. That is very handy when you want to make a variable number of rows in the new tab for each row in the other tab (for example, table 1 lists a quantity and you need a row for each quantity in the next tab--the lookup reference would be a cumulative sum of all of the quantities and you could lookup to that reference).
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..
In Sheet1 I have 50 cells for numbering (column B) and my formula is
=IF(ISTEXT(C9),B8+1,"").
There will always be 50 rows and some could remain blank if there is no text in column C.
I would like to continue numbering on Sheet3, all the way through sheet20. So, if Sheet1 actually ends on number 10, I would like sheet3 to continue to number at 11, and if sheet 3 ends on number 20, I would like sheet4 to continue to number at 21, etc.
I have tried multiple formulas, but am having difficulty because there are blanks. Your help is much appreciated!
Use "MAX" to get the higher number, and use "INDIRECT" to look at the last sheet. So assuming you're using default names on the sheets, start by getting the current sheet name:
A1=REPLACE(CELL("filename"),1,FIND("]",CELL("filename")),"")
Then get the sheet #.
A2=RIGHT(A1,LEN(A1)-5)*1
Multiplying by 1 gives you the number instead of the text. Now we can get the previous sheet name:
A3="Sheet"&A2-1
Now use Indirect to get the highest value in column C on the previous sheet:
A4=MAX(INDIRECT(A3&"!C:C"))
If we combine it, we get:
=MAX(INDIRECT("Sheet"&RIGHT(REPLACE(CELL("filename"),1,FIND("]",CELL("filename")),""),LEN(REPLACE(CELL("filename"),1,FIND("]",CELL("filename")),""))-5)*1-1&"!C:C"))
As long as your data starts in Row 2 (i.e. you have headers), here is the full formula as well:
=IF(ISTEXT(C2),IF(OR(ROW()=2,IF(ROW()=2,TRUE,MAX(INDIRECT("B2:B"&ROW()-1))=0)),MAX(INDIRECT("Sheet"&RIGHT(REPLACE(CELL("filename"),1,FIND("]",CELL("filename")),""),LEN(REPLACE(CELL("filename"),1,FIND("]",CELL("filename")),""))-5)*1-1&"!C:C"))+1,MAX(INDIRECT("B2:B"&ROW()-1))+1),"")
One way would be to put: =IF(ISTEXT(C4),COUNT(Sheet1!B4:B13)+1,"") in first cell of Sheet2, and then reuse =IF(ISTEXT(C5),B4+1,"") in all cells below.
If you would like to have all the cells with the same formula, you could move that COUNT to a hidden row just above the first one of your data.
Then you do the same thing with next sheet, just changing the naming.
I have a sheet in Excel where the columns contain different names of people that are in different teams in my department (i.e. Names in Column 1 are in Team 1).
For another sheet, I need to have a formula that achieves the following:If I write a name in Cell B2 that can be found in the first column of that other sheet (Team 1), Excel should populate cell B6 with "Team 1".
If instead, the name I wrote is found in the second column, then the text should read "Team 2".
I've tried a couple of different formulas w/o success, and stringing a lot of IF and OR functions together is way too cumbersome. Anybody has a better solution?
If you need this formula for more then only two column then id use the formula
=INDEX(Sheet1!C1:G1,SUMPRODUCT((Sheet1!C2:G6=B1)*COLUMN(Sheet1!C2:G6)))
Say you have a set-up like:
And in B1 of Sheet2 you enter Name3, you want it to return TEAM1 as shown below:
The only catch to this formula is that you will need to tell it how many columns are before your data so if you have a table more like:
Then you need to tell the formula that there are 2 rows before your data starts, your new formula will be
=INDEX(Sheet1!C1:G1,SUMPRODUCT((Sheet1!C2:G6=B1)*COLUMN(Sheet1!C2:G6))-2)
Notice the -2 before the last parenthesis this is to indicate that there are 2 columns BEFORE you data.
and the new result for looking up say NAME20 would become as follows:
*EXPLANATION: *
The formula works as follows , I will do it all on one page for easier viewing and instead of Sheet2!B2 and B6 I will use G2, and G6 on the same sheet as the data.
First we look at all values in the Range A1:E6 and find the one with the matching name so we use
=A1:E6=G2
Now when you enter this into the cell you will recieve a #VALUE,but if you goto the Formula Bar and press F9 it will shwo you the full value of the formula
{FALSE,FALSE,FALSE,FALSE,FALSE;FALSE,FALSE,FALSE,FALSE,FALSE;FALSE,FALSE,FALSE,FALSE,FALSE;FALSE,FALSE,TRUE,FALSE,FALSE;FALSE,FALSE,FALSE,FALSE,FALSE;FALSE,FALSE,FALSE,FALSE,FALSE}
In this we know that one cell contains the Name we searched for, this is represented by the TRUE
Now when using a formula like SUMPRODUCT, FALSE = 0 and TRUE = 1
So to get the column we mutiply every result by the column they are in.
=SUMPRODUCT((A1:E6=G2)*COLUMN(A1:E6))
So any cells that don't =G2 are FAlSE or 0, and when you multiply the column of that cell by 0 (because false = 0) it will simply result in 0. But for the one cell that IS TRUE or 1 When you multiply the column of that cell by 1 (because TRUE = 1) The product will be the cells column number
So as shown in the picture when looking for NAME13 the result of the sumproduct is 3 (its column)
Then to return the TEAM for that name, we use the INDEX function will return the value in a cell at the given cordinates.
In this case we want the value from A1:E1 that is in the same column as the Name we matched. When looked at as an Array A1:E1 looks like
{"TEAM1","TEAM2","TEAM3","TEAM4","TEAM5"}
And we want to return the value in that array at the same position as the column number of our cell, Minus any nonincluded column before the data, thus the reason for the -2 in the secon example I gave you.
So:
=INDEX(A1:E1,SUMPRODUCT((A1:E6=G2)*COLUMN(A1:E6)))
In this example excel interprets this formula as
Return the 3rd value (the 3 comes from the sumproduct as explained earlier) in the list of value from A1:E1. And that value would be TEAM3.
use a MATCH() or VLOOKUP() function inside an IF(). SOmthing like:
IF(NOT(ISERROR(MATCH(...)));"Team1";"")
Did you know you can browse functions by catergoty (such as Search), just clikc the fx left of your formula bar and use the drop down box. Each formula comes with a description with usually rather clear information...