Vlookup: Search For Value In SECOND Column Of Table Array And Return Value From FIRST
I'm looking for a formula to search for a value in the SECOND (instead of first) column of a table array and return a value in the same row from FIRST (instead of the same or another) column in the table array. Formula would be searching for the unique production order number in the column B and return production line id from the column A.
A1 production line_id
B1 poduction_order_number
A2 L1
A3 L2
A4 L1
B2 505212
B3 504234
B4 505663
I was trying vlookup(504234;B2:A4;2;0) to make formula go search from right columns to the left but then excel is switching the search table to A2:B4 and gives #N/D!
One remark-there is no possibility to switch these 2 columns to simplify. I have to leave them as they are.
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Search A Table, Return An Array
0000AAAAABBBBBCCCCCDDDDD 1111SugarRaisinDirt 2222MilkWaterWaterFlour 3333FlourSugarDirt 4444EggsWaterFlourSugar 5555WaterMilkDirt I looked for a way to represent my data in a cleaner way than this but couldn't find any tools....a point in the right direction would be helpful. I guess the old plug-in that converted Excel->HTML isn't available? Column A is a finished product and B-D are the ingredients to make it however values in Column A are also ingredients (sometimes multiple times). I want a formula that searches for values in Column A within the table B1:D5 and returns an array, if possible, of the finished products where Column A was used. For example, searching for Sugar would return "Flour, Water". Searching for Water would return "Milk, Eggs" (I'd rather not have Milk listed twice but beggars can't be choosers).
View Replies!
View Related
VLOOKUP With INDIRECT (become Dynamic As The Table Array Part Of The Vlookup Will Change)
I have a Vlookup which I want to modify so that it can become dynamic as the table array part of the vlookup will change. So the basic vlookup is as follows: =VLOOKUP($R$3,ATTRIBUTION_FACTSET!$M$60:$P$73,2,0) but the data I am looking for wont always be in the range M60:P73. So I tried to make it dynamic by doing the following: =VLOOKUP($R$3,INDIRECT("ATTRIBUTION_FACTSET"&"!M"&U1&":P"&V1),2,FALSE) The idea being that U1 and V1 would be numbers that can change so in this case U1 would equal 60 and V1 would equal 73 This vlookup is giving me #N/A and no matter how I modify it I cannot get it to work.
View Replies!
View Related
Vlookup Or Similar To Return An Array
I have one sheet that contains data about products, the product number, the class it belongs to, and many other bits. The data is sorted by product number. In a second sheet I have a list of classes in column G, I'd like to return a list of product numbers in columns H to wherever is needed. For example there might be two products in class one, class one is in G1, with the first product number in H1 and the second in H2.
View Replies!
View Related
Vlookup Table Array Variable
=VLOOKUP($B$54,'R:OperationsPerformance ReportingSales ReportsFTW North - INT2006Daily7 July7-02-2006[Sales TL Base Report.xls]MAXimize Summary'!$A:$BA,E$3,FALSE) I would like to make date in the table array (07 July7-02-2006) a variable, but keep getting an #NA with my limited experience. From what I can gather the single quotes are causing the problem?
View Replies!
View Related
Help With Variable Table Array In Vlookup Formula
I'm working on a project in Excel (for a restauraunt) and I basically need to make a formula to work out what an item is, using it's ID number and referencing the certain menu that it is in. as you can see the table array is defined in cell E3, but i still get a #N/A result, and when I replace the "E3" in the formula with "Deserts" it produces a result.
View Replies!
View Related
Double Vlookup For Table Array With Dates
I have a table that shows a row of dates, a row of campaigns, and then a row of values I need to reference. I need to pull the values for a specific date and corresponding campaign. For example, I need to pull the value for campaign 'notset' on 6/16/09. I tried the following, but it would only work on the first and last campaign: ...
View Replies!
View Related
VLOOKUP: Table Array Is Several Thousand Rows
I'm using a vlookup formula, and the thing I'm searching by is a part number. The problem is that in my table array, all the cells for part numbers have that green error flap in every cell, saying "The number in this cell is formatted as text or preceded by an apostrophe." Some part numbers have letters on the end of them, ie: 12345N. When I go into a particular cell's error drop down menu and choose "Convert to Number," the vlookup will work with this cell. My problem is that the table array is several thousand rows, and I don't know how to fix them all at once.
View Replies!
View Related
Change Vlookup Table Array Values
I am trying to do a vlookup where the values in the Table_Array have a string appended to them. For example: I want to look up the string "Example1" and the lookup range is Example1 - monthly Example2 - weekly Example3 - weekly Example4 - monthly So essentially I want vlookup to only look at the string before the hyphen. My initial thought was to do something like this: vlookup("Example1", left(A:A, 8), 1, FALSE)
View Replies!
View Related
Making A Table Array In A VLOOKUP Variable
I have a spreadsheet where there are multiple records for each person. Each subsequent record contains information about one year prior to the one above it. So the first records contains info for 2005, the next 2004 and so on. I have the following formula in a cell in sheet 1: VLOOKUP($A2,'Sheet1 (2)'!$A$1:'Sheet1 (2)'!$DD$8796,11,FALSE) I want to copy the VLOOKUP formula to the cell next to my original cell and have it begin searching on the first row after the first record and continue for each cell to the right. For example, if the lookup in my first cell (say A1) find the result on row 20, I want the lookup formula in B1 to start with row 21. So the change on the formula above would have to change the $A$1 above to $a$row below the first row found. I have a formula which tells me about the first instance of the vlookup finding the first row with the unique identifier.
View Replies!
View Related
Postage Calculator Using Vlookup On A Table Array
I am doing a postage calculator to calculate postal rates for posting. However, I am facing some problems. In the Main Sheet, Postal rates, I need to do something 1) We are divided into Zones - 1 to 4 Can I do a Variable that if I type Zone 1 and it will Vlookup on Zone 1 sheet and if I type Zone 4, it will Vlookup on Zone 4 sheet 2nd problem is that: The postage needed: When I did a Vlookup, when I key in 55, it will select the wrong price table, if you take a look at the attached spreadsheet, 55g for Zone 4 it came out $2.05 but it should be the following rate which is $2.40.
View Replies!
View Related
Search Table & Return Heading Of Found Value
In a large spreadsheet that receives external data, I have codes (U, N or V) allocated at various times to different rows as shown in sample worksheet attached. Elsewhere in the spreadsheet, I need to display (for later export) these codes along with their respective number in a sorted list. Please review the attached: In the spreadsheet you'll see a column of codes, the next column is the data reference number, then to the right is three columns, one for each code. As displayed in the sample book attached, each Code column is to display the data reference number (from column 2)that matches that column's code. What formula can I use to list these numbers in the appropriate columns?
View Replies!
View Related
Reference A Cell For Tab Name In VLOOKUP Table Array
Sheet 1 contains: Item Sheet 2 ABC =vlookup(A2,'Sheet 2'!$A:$B,2,false) Sheet 2 contains: Item Data ABC 2 I'm trying to get the vlookup to return the value "2" Right now, I'm manually entering the tab name in the vlookup function, even though it's contained in cell B1. The tabs are contained in the same workbook if that matters. Since this workbook is growing rather quickly, this is a painful process and doesn't feel very scalable. Since I'm using a mac, I need to do this with functions vs. macros. Does anybody know how I can reference a cell for the name of a tab in the vlookup function? I was thinking I could maybe somehow do this with the INDIRECT function but I'm stumped.
View Replies!
View Related
Copying Vlookup And Maintaining Original Table Array
I'm trying to copy a vlookup to an entire column, I want to look up a value in the cell to the left and compare it to a given table; but when I copy it down it up dates the cell value, but it moves the table down by one row at every row so it's not finding most of the values the further down I go.... what am I doing wrong. I doubt I'd have to re write the formulas in all the 2500 cells I need to look up.
View Replies!
View Related
Conditional Vlookup Return Table
Main (Sheet1) - Got a table with several informations relative to a number of a house House1 (Sheet2) - Want the information extracted from Main (Sheet1) to a table. House2 (Sheet3) - Want the information extracted from Main (Sheet1) to a table. So basicly i want to extract the info from Sheet1 if it matches the Number of the House on sheet2. With Vlookup can only get a cell value as i am not an expert in excel See the attachment
View Replies!
View Related
Search A Column Of Dates & Return Data From Another Column
I am trying to get a formula that will search one column range “B” and pull data from another, “D”. Dates are down column “B” and some of those dates are repeated several times. In column “D” there is only one piece of data (a number) entered for each day. Eg, if 08/06/2009 has been entered 3 times in column “A”, there will only be data entered in 1 of the cells of column “D” and blank cells in the other 2. Column B -- Column D 07/06/09 -- 54000 08/06/09 08/06/09 -- 62000 08/06/09 09/06/09 -- 61000 I couldn’t get the LOOKUP function to work properly, as there are duplicate dates in column “B” and I often got a result of 0 returned. As I’ve only got 1 piece of data added in column “D” per day and any duplicate days would just have blank cells in “D”, I can actually get a SUMIF function to work, SUMIF(B3:B60,DATE(2009,6,8),D3:D60). Although it does work, it doesn’t feel right using it and I would prefer a formula that would return just the one cell, instead of the sum of a range of cells.
View Replies!
View Related
Search Column And Return Values
ok I have multiple columns where Col-A can have any number between 1 and 5. Col-B has a 3 digit number in it. i want to search all of column A and determine if there is a 1 in it, if so i want it to print the value of col b into a specified area. here is an example of my form. COLA | COLB | -------------- 1 | 324 | -------------- 2 | 325 | -------------- 1 | 327 | --------------- this is basics, i will be using this to search col-a, determine what number is in the column, then print the number found in col b, on another page in a specific place, on the other page i have squares labeled 1-50. in a grid pattern, 10 squares per row. im trying to get all the entries in col-a, that are a 1, to put whatever value is in col-b in the first box of the grid, whatever is found in col-a with a 2, the value found n col-b of that row, into the grid box labeled 2 etc......
View Replies!
View Related
Search For Text Return Value In Next Column
I'm trying to create a spreadsheet using several others in several different formats. What i need to do is search for a text string eg "EVP" in one column and return the numerical value of the cell in the column next to it - then sum all the values and create a table in the new sheet eg. EVP sheet1!(value)+sheet2!(value)...etc...
View Replies!
View Related
Search A Column & Return Many Results
I have a workbook with two worksheets. On Sheet1 I have two columns 'Date' & 'Serial Number' I want to search the 'Date' column for entries that contain todays date & then display the corresponding 'Serial Numbers' in the first column of Sheet2.
View Replies!
View Related
An Array And Return The Same Row In Another Column
I have an array with a lot of rows and columns filled with different codes. I need to look into this array for one specific number and return the value in the same row in an specific column. I can't use Vlookup in this case because it needs to have the values you are looking for in the first column and my values are spread in different columns.
View Replies!
View Related
Search Value In Column However To Refresh Pivot Table
Basically my search value is in B4 however to refresh pivot table this is fine when I enter plain text within B4 I have trouble with an vba code using pivot tables Private Sub Worksheet_Change(ByVal Target As Range) 'set handler for unexpected issues On Error GoTo Fatality 'exit unless cell altered is that pertaining to the PT Page Field If Target.Address(0, 0) "B4" Then Exit Sub 'validate selection Select Case IsError(Application.Match(Target.Value, Sheets("DATA").Columns(2), 0)) Case True 'invalid selection MsgBox Target.Value & " Invalid Store Number - PT Not Refreshed & Selection Reset", vbCritical, "Error" Application.EnableEvents = False Application.Undo...................................
View Replies!
View Related
Vlookup (search All Of Column A For The Highest Number In The Range)
I WANT it to search all of column A for the highest number in the range (which will change daily to a new high number above the highest currently), and return the value in column 4 (column D) that corresponds to that value from column A. This is what I have, but it is not working, it is giving me the number (1) in Cell A800 (which is the lowest valued number in my range. The numbers range in value from 1 to 762 with none repeating (they are sequential). The formula I have is : =+VLOOKUP(MAX(A76:A2000),A76:I2000,4)
View Replies!
View Related
Search Partial String, Return Value In Next Column, Vba
I would like to search cells in column D for the partial string, "PIPE," (A full string may look like this: 'PIPE, 24"ODx0.375"WT API-5LX-65,ERW OR SMLS'). Then, if it's there, return the value "LF" in the corresponding cell in column C. If that string isn't found, then I'd like it to return "EA". I know this seems pretty easy, but there's a small problem. The word "BENT PIPE," could be in Column D, in which case, I would want it to return "EA" instead of "LF".
View Replies!
View Related
Index / Array Return A Value From Same Column In Another Sheet
I am currently looking at a simple data set spanning a few years of annual average data. I want to create a front sheet to show people in what year the maximum value was reached for each site but am having trouble returning the values...... The summary sheet is headed:...... I want the formula to say - find the summary sheet max value cell in the main data sheet row 2 (for XYZ) and return the corresponding column from row 1 (year). I've got myself in a muddle trying to create array data from the index function and want something simple. There are only about 30 rows so am happy to manually select the rows in question and repeat the formula entry so it doesn't need to be fancy.
View Replies!
View Related
Vlookup - Value Not In First Column Of Table
Is it possible to use the VLOOKUP (or similar function) when the value it is looking up is not the first column. A B C Kevin 8.00 140000003 Paul 8.00 140000001 I want to lookup the value in column C and return the value in column A. Kind of the reverse to this =VLOOKUP(E1,A1:C2,1,false)
View Replies!
View Related
VLookup Return Multiple Hits From Same Column Of Data
I am running a Vlookup on a large set of ID#'s that exist accross multiple servers. The data is structured in (2) columns how you see below , and you will notice that the same ID# can show up on multiple servers. However, the VLOOKUP is only returning the first match it finds. Assuming that I want to keep the data structured as is, how do I make the vlookup return all matches? ID# LOCATION 23 SERVER1 34 SERVER4 23 SERVER2 13 SERVER1 17 SERVER3 34 SERVER1
View Replies!
View Related
Find Value In Table & Return Column / Row Header
I am having trouble with getting a value (which is the row and column value) from a set of numbers. I have attached an example table to try and make things clearer. What I have is a table with a set of Row Headers, and Columns Headers all numeric. e.g Columns headed 1, 2, 3, 4, Rows 30, 40, 50 etc. I want to find the 1st occurrence of a value e.g. 1.0 in the table (by 1st Up mean closest to top left), and then give me the value of the Row and Column Header that corresponds to that. So for the example attached, I want to get the row Value 200 and Column 6 from finding the 1st occurrence of the number 1. I have tried various combinations of index and Match etc. But I can't get my head around the fact that the position of the 1st no. 1.0 can change, therefore I can't use any releative positions etc.
View Replies!
View Related
Return Array Elements From 2D Array
I'm trying to use an array to carry out string function on a range of excel cells. Here is the code I am using Dim arrXl As Variant arrXl = ws.Range("F1:F" & ws.Range("D1").End(xlDown).Row) For i = LBound(arrXl) To UBound(arrXl) MsgBox (LBound(arrXl)) 'If 1st char is different from 3rd char then remove all of string after 1st char If Left(arrXl(i), 1) <> Mid(arrXl(i), 3, 1) Then arrXl(i) = Left(arrXl(i), 1) End If 'If 1st char is different from 7th char then delete string after 5th char If Left(arrXl(i), 1) <> Mid(arrXl(i), 7, 1) Then arrXl(i) = Left(arrXl(i), 5) End If The lbound function returns the value of 1 as the lower bound, I do not have "Option base 1" set so I was expecting the lbound value to be 0. The first 2 cells in the F column are blank so this may have something to do with it, I am unsure if cells in excel can be null if they can be null one cell may be null and the other may be a zero length string but I am unsure about this. The ubound function returns a value of 487. The code breaks when I try to access an element in the array so it breaks on the line: If Left(arrXl(i), 1) <> Mid(arrXl(i), 3, 1) Then and returns the "Subscript out of range" error message.
View Replies!
View Related
Search Array For Value
I have a two dimensional array that I need to search, and copy a value to the sheet I am using. Example Array code1 name1 code2 name1 code3 name4 Sheet ColumnA ColumnB code2 code4 code1 code3 I need to fill in columnB with the corresponding name, leaving it blank if the code does not exisit in the array. What I have attempted (unsuccessfully) so far is below. I keep getting an Error at the If DataArray(y, 0) = majorcode line. Dim datatotalrows As Integer Dim listtotalrows As Integer Dim majorcode As String Dim clientname As String Dim y As Integer 'variable for array Dim x As Integer 'variable for data datatotalrows = Range("A1"). CurrentRegion.Rows.Count
View Replies!
View Related
Search An Array Backwards?
Is there a way to find the last matching row in an array? For example, I can find the first matching row in an array by using the MATCH function. Is there a way to search through the array backwards? Ex. OrderID 10567 10569 10571 10573 10571 If I use =MATCH(10572, A2:A6,1), I will get the result "3". How can I get the result "5" (to tell me the row number of the last match)? A more accurate example of what I am trying to do would be: OrderID 1 1 1 3 3 3 If I feed the number 2 in as my search value, I want to know the range of rows where the OrderID is less than or equal to 2. In the case above, it would be rows (assuming "OrderID" is in row 1) 2 through 4. I can get "2" back by using =MATCH(2,A2:A7,1), but I don't know how to get "4".
View Replies!
View Related
Search Using An Array Formula...
i am currently using the following array formula to search a range for a value and return its self refrence however i need to modify it as at present it will only return exact matches i need it to be able to search a string find a value and return the cell refrence
View Replies!
View Related
Search In Large Array For Value
Hi again, I am trying to find the easiest way to repeatedly search a large matrix (300,400) for a particular value. I have used two for loops in the past but its starting to get complicated now. Is there a workaround using application.worksheets.something that I could get a true of false reply? Someone may suggest that I create a function that replys back. I am new to VB and I am not sure how to send a matrix of integers to a function (syntax).
View Replies!
View Related
Search For A Substring Within An Array Of Strings
I wish to search for a substring within an array of strings and just return back an indication that the substring exists withing that array. so for instance let the substring be "rang" and let the array be {"apple","orange","lemon"}. I wish to put a single command line next to my substring and wish to search through that range and return a key code if it exists. And then I will repeat the same search for other substrings. For the moment being, I don't care too much about the number of occurences or the exact cell address where they occur. All I wish to know is whether they exist in that list or not. So it looks to me it is like a SEARCH command but except on a range of text (Rather than a single text) with an array formula. I have tried MATCH but my case is not an exact match either.
View Replies!
View Related
Looking Up Row Array Data In Column Array
On one sheet (KPI) I have either the values "x" or "" in the range A84:A89 to mark wheter to use the corresponding project in the range B84:B89. On the sheet X-ref I have the same project names in range T4:Y4 and a corresponding target value in T8:Y8 What I want is the sum (or average) of the marked-projects target-values. The result should end up in KPI!G31. In other words I want =sumif(A84:A89;"x";'X-ref'!T4:Y4) but it doesn't work since the first range is an column-array and the second range is an row-array.
View Replies!
View Related
Search And Return A Value
In the attached file, I am trying to lookup what vendor is assigned to a part, and enter the vendor number in column J, K or L, depending on the number that is assigned. For example, the top part number, RAD001, has a 2 in column N, indicating vendor # 015354 is the Alternate vendor # 1. It has a 1 in column V, indicating 034180 is the Primary Vendor, and it has a 3 in column Z, to indicate that 015229 is the Alternate Vendor # 2. What formula would I need to put in cell J2 so that if a 1 is found in row 2 it will return the value 1 position left of where the 1 is found? I will then put a similar formula in columns K and L to return the vendor number if a 2 or a 3 is found. The end result will be that for each part number you will be able to see what vendor is primary, alternat 1 and alternate 2. I want to make this a formula because the actual sheet will be thousands of part numbers long, and I will need it to update the vendor information if the primary vendor is changed.
View Replies!
View Related
Return Array With Array
how to use Array formulas in Excel. I can Sum, Count etc. I am wondering if you can return an array of data with an array formula Example: Name Replied? Bob N Brian Y Robyn N Rachel Y From the table above if I test for "N" I'd like the formula to return a list of names, in this case Bob and Robyn.
View Replies!
View Related
|