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(*))
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
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.
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?
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".
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.
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
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
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)
I have values in row A and I have values in row C. I want to create a loop to look up xxx and replace it with the values consecutively in row C. Look at example for a better Idea. I found a way to find and replace, but I not sure how to use it with qoutes. I was thinking maybe I dont even need row A and just supply a list and excel could have the chunk of data in the code itself.
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.
In sheet one I have a list of bank transactions. I want to find all transactions matching a specific search string (in $C$2). $C$2 is compared with data in column B of sheet 705334-0707-0408.
How do I get a nul value in column A (=IF(SEARCH($C$2,'705334-0707-0408'!C3)>0,ROWS($1:2),"")). I've tried to compare the result to #VALUE, and tried NOT and a few other combinations, but can't get it to work.
I cant use the contents of a different column; there are only date, details and amount. None of date or amount influence, or are influenced by the details in column B.
I have a Master work sheet consisting sale data of more than 400 Sales person for a period of 6 Months.
The Employee Codes are entered in column "F" starting from F6, F7, F8 and so on....
G5,H5, I5, J5, K5, L5 to GV5 has the product names.
G5,H5, I5, J5, K5, L5 to GV5 has the qty of product sold by that concern sales person.
Since each sales person's occurrence is 6 times in the master sheet, I would like to have a code to search each and every sales person by their employee ID through out the entire master sheet, sum each product they sold as per the product name and get it entered in their concern cells.
End Sub Control sheet B1 = SG999 Control sheet B2 = Product Description
EG - SG999 Prod Description.xlsm
Now here's the problem -
Very occasionally some users may edit the Prod Description & then need to re-save
So i need to create some code which looks for an element of the current file name in a Directory (O:PHC BomsDropbox - Stage & Gate) EG "SG999" (Which could be 5 or 6 characters in length (if we go over 1000)
Delete this file, replaces it with the new file with the edited information.
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
I have a worksheet that I produced from optical character recognition, and there are a lot of funky characters that I need to get rid of. One is a line break or carraige return (I assume it's the same character that I could insert by entering ALT+ENTER). How do I search for this special character to replace it? How do I identify what that invisible character is?
I have a work problem where my spreadsheets have the following structure due to faulty optical character recognition:
Ringholm 8 G R hem.ag Bavik Postl 115 O Amtervik Rinman K H B dir Johannebergsg 34 Goteborg S Risberg L kass Mitandersfors Bogen
In some cases the letters in the beginning of the cells have been misread as a number (above S as 8), so I want to search and replace those numbers with the correct letter without changing the correct numbers at the end of the cells to letters too. Is there any way to write a search-and-replace code in VBA that will only implement the search-and-replace in (for example) the first five letter-spaces of the cell?
I would like to create a macro to search all blank cells within a certain range in multiple worksheets to replace it with a certain blank cell. Essentially i would like to use a special values function to do this.
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?
I am looping in Excel to find "NUMBER OF EMPLOYEES". IF found I want to go up one row and replace the first 4 digits with " 9ZZ". The Line 1 data will alway be different so I just want to replace the first 4 digits. I don't want it to effect the rest of the line.
Example: Line 1 - 100 6300 BRCH TOTALS Line 2 - NUMBER OF EMPLOYEES
RESULTS NEEDED:
Line 1 - 9ZZ 6300 BRCH TOTALS Line 2 - NUMBE OF EMPLOYEES
I want to replace all blank cells in column A with the word "BLANK" but my problem is that I need to tell Excel to stop searching for blank cells in column A once and only once column A is equal to the last data row in the column named "Product Number". I tried this macro but, naturally, it replaces all the empty cells in the WHOLE COLUMN.
I will always have a header column in row 1. The data is below that (data will always start at row 2).
Columns("A:A").Select Selection.Replace What:="", Replacement:="BLANK", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False How can I change this so that the find/replace macro searches all the way down equal to the last data row in the "Product Number" column?
Below are 2 examples. Example 1 is pre macro and example 2 is post macro.