Vlookup With Wildcard Search
Oct 28, 2008
picture this.
Cell A1 = xyz3
Cell B1 = 5
Cell C1 = xyz3-hgfe-56f
I need to do a vlookup on C1 in range A1:B1 that will return B1 if C1 contains the string in A1. I've tried using the TRUE variable in the vlookup formula which does not require an exact match. This works for about 80% of my data but is not 100% accurate. Of course I've got a long list of data ... not just the 3 cells.
View 4 Replies
ADVERTISEMENT
Jul 10, 2012
I have a sheet with Names in it. I need to look those names up and find which org they belong to. The problem is the the names have many characters after them, and many names belong to a few orgs, with a the rest belonging to many orgs. (See below)
I have been trying to get a Vlookup to work, but since it can't go left, it won't look up the orgs that don't own at least three names. And I can't get the search to work on the names.
Names:
WSGHG1-8410YFH
WSSMXG-8401B8T
NBSMXG-0310V6R
NBXG-0310V6V
[code]....
View 4 Replies
View Related
Dec 29, 2011
I have a spreadsheet where there are lines of different Wage Types but only certain combinations are needed. For example I have Pay Area 1234 which needs all wage types except those beginning with a 9.
To do this I have set up Sheet1 to look like this:
12341
12342
12343
12344
12345
12346
12347
12348
and not 12349 as I do not require this type.
The problem here is I need to add a wildcard to the end of these so it finds anything that starts with 12341 etc.
Sheet1 contains the personal details of employees and I have concatenated the Payroll Area and Wage type in column D.
Code:
Sub deleterows()
Application.ScreenUpdating = False
Set MySheet = Sheets("data")
LR = MySheet.Cells(Rows.Count, "D").End(xlUp).Row
For i = LR To 2 Step -1
[Code]...
View 9 Replies
View Related
Jan 21, 2009
I have numerous formulas that use a macro with an indirect cell reference, for example:
INDIRECT(macro(A21))
I am moving these formulas to a different workbook and I need them to still refer to items in the old sheet. I accomplish this by using this formula:
INDIRECT(CONCATENATE("OtherSheet.xls!",macro(A21)))
This works. However, I need to do a global search and replace for all of these formulas without deleting my indirect cell reference. I could replace
macro
with
CONCATENATE("OtherSheet.xls!",macro
but that would leave me short a ).
Is there a way to use a wildcard to accomplish this? It does not seem that replace
macro(*)
with
CONCATENATE("OtherSheet.xls!",macro(*))
View 9 Replies
View Related
Nov 20, 2006
I need to get rid of the questions marks in the text on my sheet, but am unable to get my VBA code to search for an actual question mark and not the wildcard. I'm using the replace function as follows:
wsReport. Cells = wsReport.Cells.Replace("?", "")
1. What's the trick to searching for wildcard characters?
2. Is there a slicker way to do this?
View 3 Replies
View Related
Dec 10, 2013
I have a list of titles that I would like to see if these titles appears in another cell.
Here is the example:
A1
Manager
Assistant Manager
Manager, II
VP
Vice President, Sales
Assistant
Associate
I would like to see if it appear in this cell, regardless where it is the exact text match
B1
Manager, Assistant, VP, Sales
So the result will be like: Screenshot_1.png
View 4 Replies
View Related
Jul 29, 2014
I'm trying to perform a search of over 15,000 entries using a wildcard. Sheet1 is a list of streets in the county where I live, and I would like to be able to type a part of the name that will return every instance of that name appearing.
I found a code which i have tried to adapt, but it is not working.
[Code] ....
The item being searched will be entered into TextBox1, and I'm guessing that the error I am receiving is in the .AutoFilter Field:=1, Criteria1:=TextBox1"*" line of code. This is the original sample I found onlne:
[Code] .....
where they were only looking for the letters "GB".
View 14 Replies
View Related
Apr 30, 2009
i am having some difficulty modifing some existing code which is this: It will count all entries from G14 to G217 if *Ost* is in E14:E217
View 3 Replies
View Related
Dec 19, 2012
I would like to search for a certain pattern that appears in a cell. For example, I have certain cells that begin with a 7 digit project code (Ex: "1234567 - Project Red"). I was planning to use an IF inside a FOR loop and then do an action when I find the cell with the pattern. I thought I remember it being something like Format(########*) so that I have the wildcard on the end since there is more than just the numbers. how to make other patterns work such as Number-Letter-Number or Capital-Lowercase-Capital
View 3 Replies
View Related
Dec 26, 2012
I am trying to run a routine in VBA that will Search for a Part-No. that normally contains asterisks. It is giving me bad positive Search results due to the coding looking at the (*) asterisk's as a wildcard character.
The following Part-No.'s are located in cells (C11:C16):
9L3Z*17757*BCP
6C3Z*16138*AACP
AE5Z*16138*B
AE5Z*17E811*CF
AE5Z*17E811*F
AE5Z*17E810*F
Part-No. to be Searched for:
AE5Z*17E811*F
When the below code is run, the incorrect Part-No. 'AE5Z*17E811*CF' is found in cell (C14) rather than the correct Part-No. found in Cell (C15).
Code:
'The following 2 lines are defaulted for ease of coding
pNumb = "AE5Z*17E811*F"
Range("C11", "C16").Select
[Code] ......
View 5 Replies
View Related
Jul 29, 2014
I have a formula in column J that is the following:
=IF(I541="",IF(ISNUMBER(SEARCH(LEFT(G541,4)&"*"&RIGHT(G541,4),H541)),G541,""),"")
See screenshot:
I need to replace "G542" in the formula above. For example, in cell J541 shown above, I need it to output "1996-1999|2000-2001" instead of "1996-2001" I need the output to include LEFT(G541,4)&"*"&RIGHT(G541,4)
View 2 Replies
View Related
Feb 27, 2007
I am looking for a way, to search a cell that has a no more than 4 words sperated by a space, and if a match display it.
I had something like this:
IF(Search=LocationList,"true","False"
So the Locationlist is a list of locations that is brought from another sheet with this:
=Addresses!A3&" "&Addresses!B3
and i need to search the cells with in LocationList (about 4000 cells) for a match... is this possbile ?
View 9 Replies
View Related
Jan 7, 2014
I need to lookup data from four different columns to match a value in another sheet. The lookup value has to start with "4" in order for it to be the correct match. I've tried the following formula for just two columns:
=IF(VLOOKUP($C2,'Sheet 1'!$D$2:$H$10000,5,FALSE)="4*",VLOOKUP($C2,'Sheet 1'!$D$2:$H$10000,5,FALSE),IF(VLOOKUP($C2,'Sheet 2'!$E$2:$G$10000,3,FALSE)="4*", VLOOKUP($C2,'Sheet 2'!$E$2:$G$10000,3,FALSE),"False"))
The problem I have is that the wildcard function isn't working in my If statement (apparentley that's how Excel was designed). The first vlookup returns the value "40042565" but Excel doesn't show it matching the criteria with the wildcard ("4*").
Any way to lookup the value in C2, search through multiple columns, and return the value that starts with "4"?
View 3 Replies
View Related
Jan 31, 2014
I would like to Vlookup an association of data in a matrix where not all information is available. e.g:
Vlookup of following data (concatenate):
A1&B1&C1&D1
A2&B2&C2&D2
A3&B3&C3&D3
but in the mapping I would have a wild card (*) in certain columns (not always the same column)
The concatenate would be for exemple:
A1&*&C1&D1
A2&B2&*&D2
*&B3&C3&*
I know it works on the other way around (Vlookup of concatenate with wilrdcards) but I can not have wildcards in my source data.
View 7 Replies
View Related
Jun 9, 2014
I am building somewhat of a rudimentary search engine that looks for a name, address or unique identifier, using an Index Match formula that searches with a wild card:
=INDEX(Name,MATCH("*"&F3&"*",Name,0))
"Name": is the defined name for column C on a separate sheet.
F3: is "search field"
The current formula (above), only returns the first match. The source data is only 927 lines so not overly large. I would like to have an additional page that will show the potential results from the wildcard search via a formula. Therefore needing results; 2, 3, 4, 5 etc. from the Index Match. I have searched high and low for solutions but I have found none in regards to retrieving multiple results from a wildcard search, only on a specific term.
View 3 Replies
View Related
May 17, 2014
get the name of the File in a Vlookup VBA using wildcard characters. I have to do a VLOOKUP from a specific file which is stored in the same folder as the file in which I need to get this VLOOKUP done, however the name can change anytime keep a word common only for this specific file...
Ex:
I have a File called "Mapping as on 8th May" from where i need to lookup some information for my file and I intend to do this using VLOOKUP in VBA in a Module but since the name can change to anything such as"Mapping as on 16th May" I cant use it in the VBA code, so is there a way around this where If I have this file stored in the same folder then I keep the word "Mapping" specific and unique for all other files in the same folder that the search can pull this file name to be further used in my lookup..
how to use the wildcards in VLOOKUP lookup range for the file name as the columns are going to remain the same...
View 13 Replies
View Related
Aug 21, 2013
know if I can use a wildcard on R1C1 notation for my "lookup value" in my Vlookup, so that the Vlookup searches for a not exact match, but on the whole contents of the cell, not just the first several letters? I am using VBA, and the vlookup is in each cell of a for next loop, so I cannot use an actual cell reference which is where I've usually seen, and used wildcards. I've tried changing the Vlookup to have the lookup value be "Cells(n,2)" instead of "RC[-2]" to no avail. I need to make the vlookup evaluate all the words in cell "RC[-2]" prior to returning the value I specified, because otherwise it returns the wrong value even though I sorted my lookup table Column A A to Z.
Start Date
End Date
Event ID
"Trans-Pacific Melodies" : an East-meets-West concert presented by Carolina International Orchestra and the China National Orchestra
10/06/13
10/06/13
22297
[code]....
View 1 Replies
View Related
Aug 23, 2008
I have the following vlookup working exactly as I want it to in excel: =IF(ISNA(VLOOKUP(LEFT(C2,10)& "*", NAME,2,FALSE)),"",(VLOOKUP(LEFT(C2,10)& "*",NAME,2,FALSE))) -NAME is a defined section on another worksheet
The problem I have is when I come to use this within a vba macro I'm writing the wildcard section automatically gets spaces added so it goes from "*" to " * " and excel doesn't like it! The code I'm using to write it into the cell is simply:
ActiveCell.FormulaR1C1 = _
"=IF(ISNA(VLOOKUP(LEFT(c2,10)& " * ",NAME,2,FALSE)),"",(VLOOKUP(LEFT(c2,10)& " * ",NAME,2,FALSE)))"
how to stop the spaces being added?
View 2 Replies
View Related
Jul 15, 2012
What i have so far is:
-3 Sheets (Sheet1 - Search, Sheet2 - Data, Sheet3 - Result)
-Sheet1 has a userform ready to link up - this opens up when workbook and worksheet is activated.
-Sheet2 has some example data to search - the search is for column 1 (see attachment)
-Sheet3 has a template ready for the data to be pasted to.
I would like the search result is column 1 to copy the data from columns 1 to 7 to sheet3.
I want the template/layout to remain after the pasting of results. (everything protected from editing, if possible).
Once finished (ie go back to sheet1, i want the data from sheet3 to be cleared.)
View 9 Replies
View Related
Mar 7, 2009
I have spent the last week searching this forum to find the solutions to my various problems, I'm in mental meltdown
I don't think that I can explain here what it is I need so I have attached a sample workbook/spreadsheets.
I have NO experience of Excel and have had a little help developing the attachment, my assistant has now gone AWOL
View 10 Replies
View Related
Mar 31, 2008
I am working on a spread sheet that searches for an employee's clock number, pulls the data from a particular week and displays it all on one page. I have 6 different tables of different stats, 4 weeks each and I would like to pull all of this data together. I have successfully created a page that when you plug in an employee's number, all of thier stats apear from all 6 data sets for the last 4 weeks. I do this by using ....
View 9 Replies
View Related
Jan 17, 2007
I have a few tables on a worksheet, and to search these tables i am using a VLOOKUP, however i want to be able to search for other than just the one field! but still pull up all of the data. If i were to do the same tables in access i would be able to query all fields and then recieve an output of those that match, is there any way to do this in excel
Note I am only into basic VB. Other question i have is, on a VLOOKUP you only return the one record, is there anyway of searching a table of data and returning all records that hold that value in a specific field, like applying a filter to them. or am i just being extrememly dumb and missing something simple?
View 9 Replies
View Related
Jul 15, 2012
The attached wb will be used to schedule 10 machines. I have a dispatch ws that will have the machine # in column A, job/lot/ assy in column B, and load hrs in column C. there is a ws for each machine number. I want the worksheets for each machine to look in the dispatch ws, and return the info from B and C that has it's number in A for every occurence, currently it will return the 1st occurrence only.
Schedule.xls
View 5 Replies
View Related
Nov 17, 2008
If I have a store number (say 1234) and I am trying to search for something which contains 1234 (i.e. the whole string of ABCD1234, ABCD1235, ABCD1236 etc) is it possible to do this in one VLOOKUP formula?
One way of doing it would be to VLOOKUP("ABCD"&"1234",....) but I would rather do it the other way around, to prevent the formula from not working.
View 4 Replies
View Related
Nov 26, 2008
I have a lookup table (see attached file) which holds the min & max value for a vehicle, the min & max size of the engine and the premium. I want a function that will search for the value of the vehicle (e.g. 100000 in cell H5) within the min value and max value columns as well as the engine size (e.g. 2000 in cell H6) in the min size & max size columns return the premium from the associated premium (which should be 13,200).
View 2 Replies
View Related
Sep 29, 2011
I get new worksheets on a regular basis which are of the same format (same columns with headers) and I have to perform both vlookups and sumifs on them. Their are about 12 different tabs I perform the vlookup on based a vendor name in A2 and its corresponding tab. I am tired of typing the same thing over and over again.
What I'd like to write is a Control Panel with all the equations so I can just copy/paste them in when I get a new sheet.
How can I write a vlookup which would search for the value which is one cell to the right of where I put the formula in?
Similar to:
=vlookup(current cell over one, 'vendor1sheet'!A:C,3,0).
I would then want to copy it down the worksheet. Currently type in column E everytime I get a new sheet:
=VLOOKUP(F2,'Vendor1'!A:C,3,0)
The catch
Column A has the vendor name, there are about 12 vendors, each with a different tab with related data which I am searching through.
Ultimately, I'd like to have an equation that would do the vlookup (and sumif) as described above and also use the vendor name in column A to look on a particular tab.
Something like:
=vlookup(one cell to the right,'VendorTabFromVendorNameInColumnA'!A:C,3,0)
I was going to use nested if statements on a control panel sheet with a column for the vendor name and a column for the vlookupformula and than paste a single formula all the way down column E:
In column E, every row:
If(A2=vendor1, 'controlpanel'!vendor1equation), if(A2=vendor2, 'controlpanel'!vendor2equation), etc.
Again, the vlookups would all check for one cell to the right of where this nested if statement was (located in column E, looking in F).
View 3 Replies
View Related
Apr 3, 2008
1. can i limit vlookup on sheet2 to search only a certain range of cells on a sheet1.
example, I want vlookup to look in sheet1, colum A - Y but only look between rows 1 and 100
2. If 1 can be done, and i happen to add a row in worksheet1 (making it 101 rows vice 100) will the vlookup code on sheet2 include that 101st row or do i have to redo the range manualy.
View 9 Replies
View Related
Feb 23, 2007
I have an XLS sheet filled with every zip code in the US... the zips are in multiple columns adjacent to columns with the corresponding county names.
Unfortunately, the there are up to EIGHTEEN columns of zip codes in each row describing the counties... not one zip per row. I'm assuming this was done to save space.
In another sheet, I have list of client zip codes and need to VLOOKUP the corresponding county from the first sheet. I'm certain I'm not using VLOOKUP right...I'm getting #N/A every time.
Is this because it's only checking the first column of zip codes? I need it to check all 18 columns of course... there are no repeated zips.
How do I do this without rebuilding the full zip database page?
View 3 Replies
View Related
Dec 29, 2008
I want to use vlookup up function to search for a specific data set. when it finds it i want it to look 2 columns over and add the value then continue to search for the specific data set again in the range provided in the vlookup, when it finds another matching the criteria look 2 columns over and add that cell value to the previous count.
keep a running total until it has looked through the whole sheet. here is an example of the vlookup i am using, it is not suming because thats where im stuck. also a quick data set to picture what i am talking about. In the data set in plain terms i want to look for the line name and add the qty on that line into a chart.
=IF(ISNA(VLOOKUP(A8, 'Web Queries'!G$3:H$40, 2, FALSE)) = TRUE, 0, VLOOKUP(A8, 'Web Queries'!G$3:H$40, 2, FALSE))
LineOrder_NumQTY
7L58545487320
7L5856060351
Z_56784817515
Z_56784824115
Z_57454577222
Z_57454562424
Z_57454547524......................
View 5 Replies
View Related
Feb 2, 2010
In the attached sheet I am trying to use the formula below but am getting a #NA error. I have narrowed the problem down to the use of the SEARCH and LEFT functions that I am using to determine the lookup value of the VLOOKUP formula.
what I am doing wrong? If I substitute the SEARCH and LEFT function with the number "14" it works just fine. You can find examples of both in cells B29 and C29 on the rename tab.
View 5 Replies
View Related