Search For The Character- Not Wildcard

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


ADVERTISEMENT

Wildcard Character In IF Condition

Nov 17, 2008

I have a little problem in using wildcard character in IF condition.

eg:
--------------------------
For I = 2 to LastRow
If Activesheet.cells(I,5).Text = "ENF*" then
...........................
...........................
...........................
End If
Next I
--------------------------

I want the code to search for any word starting with ENF and then take the necessary action.

Could anyone tell me how to make use of wildcards in a situation like this.

View 15 Replies View Related

Wildcard Character In Sum If Statement

Apr 26, 2007

The below is a formula I utilize to collect totals for individual associates.

=SUM(IF('01_05_07'!$C$6:$C$102="Petri, Pete #1",'01_05_07'!$AW$6:$AW$102,0))

What I would like to do is keep this same formula but somehow add a wildcard character so that I could capture all totals for Petri, Pete as there are Petri, Pete #1 thru Petri, Pete #15. Anyone aware how to revise the above formula. I've tried utilizing the * and ? characters but I must be putting them in the wrong place as I am not able to get it to work??

View 9 Replies View Related

Search Using Wildcard In Macro

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

Using Wildcard With Search And Replace

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

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 View Related

Wildcard Search - Titles To Appear In Another Cell

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

Search On Multiple Entries Using Wildcard

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

Formula For Wildcard Search Only If All Critera Is Meet

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

VLookup In Array Search With Wildcard Characters

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

Search For Pattern Of Numbers / Letters And Wildcard

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

Can Wildcard Search Asterisk Be Tuned Off When Using VBA Code?

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

Wildcard Info In Output Of Search Formula?

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

Search Text Cell For Wildcard Match

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

Retrieving Nth Results From Index Match Using Wildcard Search Term

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

Search By Special Character?

Feb 8, 2013

just had 11,000 customer account arrive and they are all messed up!

I am working through all the email address's and lots are not valid ones, is there a way i can make some sort of rule that willl do the following

If ther is no @ symbol, in Cells A ( any of A ) it drops them to the bottom of the list, or anything that just splits them up

Eg

fWGHFUI@JHEGF.COM
EFHWHEF@WEGFIW.COM
EKFGWIGF@YTRQUH.CO.UK
HJGIWEROPQWRP@WEYIO.COM
ASFHWIEGFIUQWEFH.COM
EHFIOQH12.CO.UK

This would split the bottom 2 email address away from the others as they dont have the @ symbol!

View 1 Replies View Related

Search From Cell And Replace With New Character

May 14, 2014

I have a requirement... which need to search from a cel if it march then replace with below name. When user gives a selection screen, month displays in a cell A1.

For example: If this cel (A1) is jan then it should replace with Jan, if mar then replace with mar, if MAI then replace with MAY, if sep then replace with SEP, if OKT then replace with OCT.... and so on...
or
It search the cell A1 for MAI, then replace with MAY & also should search for if A1 is OKT then replace OCT, & also if A1 is DZC then replace with DEC.

I know the function of ....

[=IF(ISNUMBER(SEARCH("*MAI*",A1)),"MAY",A1)] =

This formula brings me only 1 search, but I need 3 search if match replace with respective character. this should search for OKT & DZC ALSO....

present - new

JAN - JAN
FEB - FEB
MAR - MAR
APR - APR
MAI - MAY
JUN - JUN
JUL - JUL
AUG - AUG
SEP - SEP
OKT - OCT
NOV - NOV
DZC - DEC

View 4 Replies View Related

Search And Replace Specific Character?

Jun 1, 2012

In a cell(s) I have for example {text}dd%2BMore_Text}

what i want to do is search and replace the final }

so it should be {text}dd%2BMore_Text

the regular search and replace in excel removes all } which is not what i need.

View 6 Replies View Related

Search And Replace Character With Cell Value

Mar 24, 2014

A1 value: HARD COVER + SCREEN PROTECTOR - IPHONE 5
B1 value: WH

Want to search for the character "-" and replace it with "WH" from B1 Cell

Do this for all $A column

View 2 Replies View Related

Macro To Search For Character Then Divide Value Following It

Oct 1, 2013

I have a large numeric spreadsheet of water quality data for a range of metals. On occasions where a particular metal is below the limit of detection, the entry reads ".

View 4 Replies View Related

Unwanted Character, Can Not Search And Replace

Dec 18, 2007

I have a sheet that I often have to edit and import into SQL database.

I have no control over the format of the sheet given to me and it seems that something has changed causing me the following problem.

When I try to import the Data it’s showing ten times as many items than are actually there.

The problem I think is in a text column. I’ve tested this by using an old column from a previous sheet and pasting this into the new sheet and I can import it ok.

What I seem to have is a rectangular box character but I’m not sure what it is.
I can copy and past it into Notepad as it is, but pasted into Word it seems to be a carriage Return.

So whether it’s an actual charter or not I’m not sure.

Are there any tools out there so I can hover over characters in Excel to see what it is! So at least I can be sure what I’m trying to Search and Replace?

View 9 Replies View Related

Search For A Character In A Cell From Macro

Jun 10, 2009

i would like to use a macro to check whether the string present in a cell contains special characters like @,#,$,%,^,&,*. i need to do this using a macro. is there an in-built function to do this or is there any other way to do this.

View 9 Replies View Related

Search For Special Character * (Asterisk)

Jan 2, 2008

I'm working again with a large Inventory Database dump into a workbook and in the past the company appended the * character to designate an updated price on an item(column C). Its rocking my world to sort through things with this character as you can tell. I'm trying to find rows that column C has a * in, cut, and paste them into another sheet called "Updated". I would even accept just how I'd do a simple "find/replace all" on that character and then I can just update my macro and be on my way Anyway this is the macro thus far and as you can see it would just cut all rows and paste them to "Updated".

Sub Updated()
With Worksheets(1).Columns("C")
Set c = .Find("*", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.EntireRow.Cut Destination:=Worksheets("Updated"). Range("A" & Worksheets("Updated").Range("A65536").End(xlUp).Row + 1)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub

View 2 Replies View Related

Search Character In Cell And Split To Two New Cells

Sep 19, 2009

I have a spreadsheet that I have to extract from a web based report at work. The problem is that the column that contains the department name also contains the department code in brackets. For example cell A2 will have: (DE) Department A and cell A3 may be (DEPT) Department B.

Now as seen in the example above a code can range from 2 to 4 letters. I wondered if there was a way in code that would search for the ')' character and copy that to the M column and then copy the department name into the N column. So M2 would have 'DE' and column N2 will have 'Department A'.

Also in column G contains the grade name and grade point which are separated by a '/' I would like this to be copied to 2 separate cells say O2 and P2 and so on.

I know this can be done by a formula but I have to do this every month and it would be nice to just click a button to run a macro in my personal.xls file.

The row number various and are usually several thousand. I have attached a sample spreadsheet that only contains 4 rows of data.

View 7 Replies View Related

Find Column Character Search Result

Jun 9, 2009

I'd like to search for text and get the column character where the cell with the found text. The combination the two 'demands'/formulae into one are giving me problems. And the fact that the column character can exist out of two characters I cannot solve.

I can get the column number with HLookup right? and it gives me the column number, not the character. I can solve this partially (and ugly even more) with =Char(((Hlookup etc)+64 (letter before A))).

View 5 Replies View Related

Excel 2010 :: Using Find Function On A Range And Search For (,) Character

Jan 22, 2013

I want to use the find function on a range and search for a "," character. If I get a "," I want to return a True otherwise false.

I tried just recording a macro using the find function but no code shows up.

how to use the find feature in a macro, can this be done?

excel 2010

View 4 Replies View Related

How To Remove Special Character Without Disturbing Other Character

Nov 27, 2012

To all sifus out there, how can i transfer from these:

NAS517-3-2
-41353913
NAS517-3-5
NAS517-3-4
-42MS27253-2
-43353908
-44357182

To these:

NAS517-3-2
353913
NAS517-3-5
NAS517-3-4
MS27253-2
353908
357182

View 1 Replies View Related

Append All Digits Before Character To All Numbers Between The Same Character

May 18, 2008

I have got a list of numeric abbreviations, for instance 10739011/21/31/41. What it should really display are the numbers 10739011, 10739021, 10739031 and 10739041 (the first six figures stay the same). All the numbers in my list are 8 figures long. I want to change the list from the list seperated by the backward slash to the complete numbers. I have uploaded an example of the list with backward slash between the numbers. Is there a way that Excel can automatically change these numbers to the full numbers?

Because all the numbers are 8 figures long, I thought the first 6 figures of the 1st number can be copied and those 6 figures pasted before the other two figures after the backslash. Auto Merged Post Until 24 Hrs Passes;sorry, pressed OK too quickly. The problem is that there are sometimes 4 numbers in the cell, sometimes 6 and once three. I would like Excel to complete all the numbers in the cell and then move on to the cell underneath it and so on. Also, I would like each number to have it's own cell.

View 5 Replies View Related

Look For Character In Cell And Insert New Character - For More Than One

Sep 20, 2009

I have a cell which will contain SER01+SER02+SER03

and what i need it to contain is [SER01]+[SER02]+[SER03]

and shocker is i've got this to work for the first instance but not the other two

code as below... be grateful for your help

Sub measure1()
Dim list As String, pos As Integer, refl As String, refr As String, newlist As String
list = Cells(1472, 16).Value
pos = InStr(list, "+")
refl = Left(list, pos - 1)
refr = Right(list, pos + 1)
newlist = "[" & refl & "]"
Cells(1472, 17) = newlist
End Sub

View 9 Replies View Related

Add Character After 1st Character Of Cells

May 6, 2008

Need a formula/code that will determine what the corrected part number should be (insert dashes if they are missing) by comparing to other values in the list.

Original A1:A5 = {452, a-bc, 123, 4-52, abc}
Corrected C1:C5 = {4-52, a-bc, 123, 4-52, a-bc}

I can do this using an intermediate working column, but can this be done all in one formula, or via VBA?

My formulaic solution is thus: .....

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved