My excel have 2 sheet. First sheet contains a Target column. There is a Point Column as well. I want if the target value in between sheet2 then corresponding point of sheet2 is plased in the Point column of sheet1. I try using vlookup but its works only the value of sheet2 is exactly same, not in the range. Any help will be appricite.
Note that the sheet should give point n if it is between (n-1)*100000+1 and n*100000.
So just take D5 = ROUNDUP(B5/100000, 0) and it will work, in this specific case.
It is also likely to be much faster than using VLOOKUP.
Related
After a lot of brainstorming I leared to write this forumula and it actually worked, however, when I tried to drag it down it did not work on some of the random cells in sheet and gave #REF error. I am not able to understand that when the value is there and the formula is working oo other cells then why on dragging it did not work on few.
Please helpm thanks in advance
Here is the formula
=INDEX(Volume!$D$3:$F$68,MATCH(B23,Volume!$A$3:$A$68,0),MATCH(D23,Volume!$D$2:$F$2,0),MATCH(E23,Volume!$B$3:$B$68,0))
Attached is the link to access Excel sheet because samme formula on dragging miss some of the random cells and shows #REF.
https://docs.google.com/spreadsheets/d/1fEyTc3SUAgumFr54HC2LVLoXGAbum9uG/edit?usp=sharing&ouid=102884722585384256735&rtpof=true&sd=true
It looks like you're trying to check three columns with an INDEX formula but your fourth argument is wrong (the 'MATCH(E23,Volume!$B$3:$B$68,0)' part). This argument selects which range of data should be used but you're giving it a value outside the range of data e.g. that part of the formula in cell H23 on the 'Sea Freight Rates' sheet returns 24 but there's no 24th column of data you've specified. The formula only works in some cases by pure accident and because of how the data on the 'Volume' sheet is laid out.
This is the formula that you want to use in cell H2 and then drag down. The 'MATCH($B2&$E2' part joins the value in column B and E together to give a unique combination (e.g. 'CNNBO PT20DC' for cell H2) while the 'Volume!$A$2:$A$68&Volume!$B$2:$B$68' part produces an array of all possible combinations from the relevant columns in the 'Volume' sheet. It will look for 'CNNBO PT20DC' in this array and return the relevant row number. The formula then looks for the correct 'Destination Port' like you have before which gives the relevant column number. You'll then get the correct value and that row and column:
=INDEX(Volume!$D$2:$F$68,MATCH($B2&$E2,Volume!$A$2:$A$68&Volume!$B$2:$B$68,0),MATCH($D2,Volume!$D$2:$F$2,0))
Side-note, you have two rows for INNSA PT and 20DC on the 'Volume' sheet (rows 6 and 22) - is that correct?
I have an Excel Workbook with two Sheets. In one sheet I have these values:
and in the second sheet i have this values:
What I want is that in the Sheet2 the cell E to have values of Prognose from Sheet1 where "Motor" of module_team and "OM470" of series gives values based on Datum_produktion in the Sheet2.
The formula that I have tried till now is this but it doesn't seem to give me the values that I need.
=IF(Tabelle1!B2="Motor";VLOOKUP(A2;Tabelle1!$F:$H;2;FALSE);VLOOKUP(A2;Tabelle1!$F:$H;2;FALSE))
I also tried this formula but it gives me the #NUM! value.
=INDEX(Tabelle1!$G:$G; AGGREGATE(15; 7; ROW($2:$500)/((Tabelle1!$D$1:$D$500=E$1)*(Tabelle1!$F$1:$F$500=$A2)*(Tabelle1!$B$1:$B$500="Motor")); 1))
I adjusted the Settings in the Calculation part by checking the Enable Iterative but still it doesnt work.
An exmaple how should look in the Motor under OM470 sheet.
Your help is much appreciated!
You may use SUMPRODUCT to solve your issue:
=SUMPRODUCT((Nr_module_team=100)*(series="OM470")*(Datum_Produktion=I2)*Prognose)
I have used a few named ranges in my formula:
Nr_module_team: Column A on your Sheet1;
series: Column D on your Sheet1;
Datum_Produktion: Column F on your Sheet1;
Prognose: Column G on your Sheet1,
You can replace these named ranges with actual cell references.
Cheers :)
This line:
=IF(Tabelle1!B2="Motor";VLOOKUP(A2;Tabelle1!$F:$H;2;FALSE);VLOOKUP(A2;Tabelle1!$F:$H;2;FALSE))
checks if B2 = 'Motor' in Sheet 1
if so, it looks up the date in Col A (Sheet 2) and returns the value from Sheet 1 in the row matching the Col A value
if not, it does exactly the same thing.
If you want 0 or null (I'll assume 0) in the cells where the value in Sheet1!B2 is not 'Motor', change your lookup formula to:
=IF(Tabelle1!B2="Motor";VLOOKUP(A2;Tabelle1!$F:$H;2;FALSE);0)
Change the '0' to "" if you want an empty cell.
Based on your comment (you want the figure when the value in Col B = 'Motor' and the value in Col D = 'OM473') change the formula to:
=IF(AND(Tabelle1!B2="Motor", Tabelle1!D2="OM473"); VLOOKUP(A2; Tabelle1!$F:$H; 2; FALSE); 0)
I have an Excel spreadsheet with multiple sheets. Sheet 1 has a lookup value in column A that, if it exists in another sheet, I want to return the value from the cell on the same row in the other sheet but from column D. I have managed to get it working if I hard code the sheet:
=IF(ISERROR(MATCH(A6,Sheet2!B:B,0)),"",INDEX(Sheet2!B:B,MATCH(A6,Sheet2!B:B),0))
I don't however want to restrict the search to Sheet2. I have tried to generate a named range SheetList to use with INDIRECT() to replace the lookup array like this:
=IF(ISERROR(MATCH(A6,(INDIRECT("'"&SheetList&"'!B:B")),0)),"",INDEX(INDIRECT("'"&SheetList&"'!A:A"),MATCH(A6,(INDIRECT("'"&SheetList&"'!B:B")),0)))
but I can't get it to work. I feel it is time to admit defeat and ask for help!
Thanks
Assuming you only have a few sheets to look through, you can do this quite simply with nested IFERROR statements. IFFERROR first attempts to perform a calculation - if that calculation is valid, it returns the value. If that calculation results in an error, it returns an alternat result as specified by you.
You can use this to check through each sheet, cascading down to the subsequent sheet each time it fails to find a match, as follows [Note that I have adjusted your INDEX to pull the value from column D of any sheet where column B from that sheet matches A6 on the current sheet. This may not be exactly how you want it to pull]:
=IFERROR(INDEX(Sheet2!D:D,MATCH(A6,Sheet2!B:B)),IFERROR(INDEX(Sheet3!D:D,MATCH(A6,Sheet3!B:B)),IFERROR(INDEX(Sheet4!D:D,MATCH(A6,Sheet4!B:B)),""))))
This first tries to grab column D from sheet2 where A6 is found on column B from sheet 2; if it errors, it then tries sheet 3, and if that errors it then tries sheet 4. If no match is found in sheet 4, it provides a blank response.
In case you have not solve this yet. Try...
=IF(ISERROR(MATCH(A6,(INDIRECT("'"&"Sheet2"&"'!"&B:B)),0)),"",INDEX(INDIRECT("'"&"Sheet2"&"'!"A:A),MATCH(A6,(INDIRECT("'"&"Sheet2"&"'!"B:B)),0)))
or type the sheetnames in A1 and Range in B1 then reference them
...indirect("'"&A1&"'!"&B1)...
then you can just change the value in A1 or B1 to make it dynamic :)
I need to come up with a validation in a summary sheet of excel. The validation will display the cell reference ( not value) from a column in another excel worksheet. The validation is simple enough: Check column A - rows 1 to 100. If these are non-blank, then column B - rows 1 to 100 also need to be non-blank; in case any cell in column B is blank then return the cell reference to the summary sheet.
In case Column A ( any of the rows ) is blank, then column B also should be blank.
Thanks.
Here's a formula that should do exactly what your asking for, unless I misunderstood the question. It assumes your data starts in Sheet1 cell A1.
=IF(AND(OR(ISBLANK(Sheet1!$A1),ISNA(Sheet1!$A1)),AND(NOT(ISBLANK(Sheet1!$B1)),NOT(ISNA(Sheet1!$B1)))),"B"&ROW(Sheet1!$B1),IF(AND(AND(NOT(ISBLANK(Sheet1!$A1)),NOT(ISNA(Sheet1!$A1))),OR(ISBLANK(Sheet1!$B1),(ISNA(Sheet1!$B1)))),"B"&ROW(Sheet1!$B1),"Valid"))
I tested this and it works fine. Tailor it to work with your workbook and let me know if it works for you.
My question is how can I find an intersecting cell of a specific column and row number?
My situation is this: with some calculations I find two cells, lets say B6 and E1. I know that I need a row of the first one and a column of the second one. So I could just use ROW and COLUMN functions to get the numbers. After that, I need to find an intersecting cell. Which would be E6 in this example.
I would just use INDEX(A1:Z100;ROW;COLUMN) but I don't know the exact area that I'm going to need - it depends on other stuff. I could use something like A1:XFG65000 but that is way too lame. I could also use a combination of INDIRECT(ADDRESS()) but I'm pulling data from a closed workbook so INDIRECT will not work.
If this would help to know what is this all for - here's a concrete example:
I need to find limits of a section of a sheet that I would work with. I know that it starts from the column B and goes all the way down to the last non-empty cell in this column. This range ends with a last column that has any value in first row. So to define it - I need to find the intersection of this last column and the last row with values in B column.
I use this array formula to find the last column:
INDEX(1:1;MAX((1:1<>"")*(COLUMN(1:1))))
And this array formula to find the last row:
INDEX(B:B;MAX((B:B<>"")*(ROW(B:B)))
Last column results in E1 and last row results in B6. Now I need to define my range as B1:E6, how can I get E6 out of this all to put into the resulting formula? I've been thinking for a while now and not being and Excel expert - I couldn't come up with anything. So any help would really be appreciated. Thanks!
You can use an Index/Match combination and use the Match to find the relevant cell. Use one Match() for the row and one Match() for the column.
The index/match function to find the last cell in a sheet where
column B is the leftmost table column
row 1 is the topmost table row
data in column B and in row 1 can be a mix of text and numbers
there can be empty cells in column B and row 1
the last populated cell in column B marks the last row of the table
the last populated cell in row 1 marks the last column of the table
With these premises, the following will return correct results, used in a Sum() with A1 as the starting cell and Index to return the lower right cell of the range:
=SUM(A1:INDEX(1:1048576,MAX(IFERROR(MATCH(99^99,B:B,1),0),IFERROR(MATCH("zzzz",B:B,1),0)),MAX(IFERROR(MATCH(99^99,1:1,1),0),IFERROR(MATCH("zzzz",1:1,1),0))))
Since you seem to be on a system with the semicolon as the list delimiter, here is the formula with semicolons:
=SUM(A1:INDEX(1:1048576;MAX(IFERROR(MATCH(99^99;B:B;1);0);IFERROR(MATCH("zzzz";B:B;1);0));MAX(IFERROR(MATCH(99^99;1:1;1);0);IFERROR(MATCH("zzzz";1:1;1);0))))
Offset would seem to be the way to go
=OFFSET($A$1,ROW(CELL1)-1,COLUMN(CELL2)-1)
(The -1 is needed because we already have 1 column and 1 row in A1)
in your example, =OFFSET($A$1,ROW(B6)-1,COLUMN(E1)-1) would give the value in E6
There is also ADDRESSS if you want the location: =ADDRESS(ROW(B6),COLUMN(E1)) gives the answer $E$6
The following webpage has a much easier solution, and it seems to work.
https://trumpexcel.com/intersect-operator-in-excel/
For example, in a cell, type simply: =C:C 6:6. Be sure to include one space between the column designation and the row designation. The result in your cell will be the value of cell C6. Of course, you can use more limited ranges, such as =C2:C13 B5:D5 (as shown on the webpage).
As I was searching for the answer to the same basic question, it astounded me that there is no INTERSECT worksheet function in Excel. There is an INTERSECT feature in VBA (I think), but not a worksheet function.
Anyway, the simple spacing method shown above seems to work, at least in straightforward cases.