I have a list of abbreviated words in product descriptions (about 6,000 items), need to replace with proper words. I am now doing this with Edit, Find, Replace and I check the list manually with my eyes in order to avoid replacing wrong words. It is very, very time consuming (I've already spent 2 days on this job).
Just wonder if there is any way to do this faster and more accurate.
What is the best method for searching and replacing within a string when the string to be replaced could be say 1 of 10 options and could appear in any position within the string ? To make it easier let's say wherever those sub strings appear they are to be replaced (ie none to be left behind), and lets say they are all to be replaced by another character -- specific to each string being replaced.
Example:
Say I want to replace any digits in a string, to be replaced like for like as follows:
0 -> a 1 -> b 2 -> c 3 -> d 4 -> e 5 -> f 6 -> g 7 -> h 8 -> i 9 -> j
Sample strings:
Luke is 0 Donkey Luke is 0 Mul4 0nd Luk4 is not very cl4v4r Luke can not h40r very w4ll.
I have a cell with a url in it, Say in A1 I have the following url: mrexcel.com/forum/forumdisplay.php?f=10
I want Cell B1 To copy what's in cell A1 but delete everthing after the backslash"/" In B1 want it to show: mrexcel.com
What I have now doesn't work, which is: SUBSTITUTE(A1,"/*","")
An attempt to use a wildcard (*) to remove everything after the backslash. Doesn't work What's the correct formula that will allow me to do this automatically?
i have a macro that copies info from cell in row A and uses that info to name the whole row, now if the name has a space between the words it uses _ (underscore) substition so i don't get an error (when row name is defined - you can't use any special characters or spaces) i was wondering if anyone can help me to add "-" besides the space
here is the macro Sub Macro1() Dim a As Long For a = 1 To Cells(Rows.Count, 1).End(xlUp).Row Cells(a, 100) = Application.WorksheetFunction.Substitute(Cells(a, 1), " ", "_") ActiveWorkbook.Names.Add Name:=Cells(a, 100), RefersToR1C1:="=Sheet1!R" & a Next a End Sub
I'm trying to get a user friendly button to simply select then import a csv file into excel. I recorded a macro which runs on clicking a command button. below is the
I have a large column of text with multiple entries similar to this: PC3L-10600R-9-11-A0. I need to replace the "11" with a 13. However I have other instances where the 11 appears (PC3-12800E-11-11-D0 or PC3L-12800R-11-11-A0).
I have found that I can use SUBSTITUTION
{=SUBSTITUTE(A50,H50,I50,1) and =SUBSTITUTE(A61,H61,I61,2)}
to handle the specific instances but I'd like to have a way to combine this type of function logically in one command.
I have an excel program that is supposed to count word instances in a word document. I can't seem to find the right declaration for a word document. For example to declare a workbook in excel its
Dim wb As Work Book
I've tried
Dim doc As Word.Document 'or Dim doc As Word.Application
as shown in some of the forum posts, but an error user-type not defined keeps displaying.
Is it possible to export Excel cell contents to Word fields in a protected Word document? For example...
What code would be needed to tell Excel to open up, copy and export the contents of A2 in the active sheet of a workbook to "Field 2" in a Word document named "Report 01" and then put the contents of B2 to "Field 2" etc?
Do both applications have to be opened up at the same time or is Excel able to open up Word on its own? Will the macro be able to....
1. Automatically open up the correct Word document?
2. Look ONLY in a certain folder for the "Report 01" Word document?
or
Bring up a "selection" box that allows you to select the document you wish Excel to export it's data to?
3. Close and save the Word Document without any user intervention?
I need to count how many times the word Test is in the range B4:H9 with
Range N2 = Test the formula below works if Test is only in the cell once.
=COUNTIF($B$4:$H$9,"*" & N2 & "*")
But I have data in cells like below, this is all in one cell, so how would I have it count all the times test is in the range when some cells have test 2 or more times in a single cell?
I need my macros to search for the word "Cancel" or "Cancelled" in columns "T" and "U". Once found, I need the macros to make that entire row an opaque shading.
There will be other wording in these cells that contain "Cancel" or "Cancelled". Is it possible for the macros to search in the sentence and find the words "Cancel" or "Cancelled"
1. I have a excel file with Japanese words in column A and their English equivalents in column B.
2. I am trying to create a Macro and assign it to a button. On pressing the button Macro should be able to:
3. open a form where I can enter location of a word file.
4. Macro should open the word file specified in (3).
5. Macro will pick up first Japanese word from excel file (Sheet 1 - A1)
6. Search for that word in Word file
7. Replace the Japanese words in Word file with their English equivalent from excel (B1)
8. Then it should search for second word (A2) and replace with its equivalent (B2) and so on till it reaches last filled cell in excel file column A.
After a lot of search I could find a code from net (Below), made a few changes, but it is not working.
======================================================== Private Sub OK_Click() ' Requires a reference to Microsoft Word xx.x Object Library Dim sFile As String
I am in the middle of automating a process here at work, the program takes a word, "pencil" for example, from excel. It will then open up a word document with content already in it (premade template). The program will then find all instances of a string, "placepencilhere" for example, and will replace that instance with the string from excel.
Basically I want to be able to take a variable that has a stored string value from excel and use it to replace another variable in a word document.
I tried recording a replace (ctrl+f, replace tab) macro, copying the code, and inserting it into the excel vba code.. but I get a error message. Here is what I have:
I have a bunch of cells in column b that have products.
Column B Dell 24" lcd vaio sony laptop 8.0 mpxl kodak camera photoepsonprinter
Basically in Column A I want a formula that'll say.
If the word "dell" is somewhere in cell b1, then put the word "Dell" in cell a1. If the word "sony" is somewhere in cell b1, then put the word "sony" in cell a1.
And then so on and so forth down through column A. The brand names are potentially endless, so is there a easy way to on like a seperate sheet make a list of brand names and have it pull from there?
Originally I made a if function that said if the brand name was contained in the cell then output the brand name, but that caps at 7 for the amount of brands i can use....
Im trying to figure out to give a certain word a numeric valuve in excel?. Lets say that the word "car" has the valuve of 10, and the word bus has a value of 20. Have found one possible way to get around being forced to give a certain word a value by doing alittle macro, but havent got it to work yet (and im not sure if its even possible to get it to work), I have a post in the macro section about it.
I have an excel sheet that contains different values in data cells for example: A10, A22, A45 etc.
I want to have a button which when clicked, should create a word document from a template and the values at these cells should go into the template file. Thats it.
So say when the button is clicked, the newly created document should be something like this:
The award goes to Mr. Value in cell A10 living at Value at cell A22 of amount Value at A45
My current code is below and works, but I need to change it some. I dont want to select for one value to another, I need to select all "YDF" in column E. (They will all be right after each other)
HTML Code:
Sub Selectword() Dim rng As Range Set rng = Range("E1:E" & Cells(Rows.Count, 5).End(xlUp).Row) With ActiveSheet .Range(rng.Find("YDF"), rng.Find("YEG")).Select End With End Sub
i have a set of data in excel.. i want that, when i click a command button on an active worksheet, it will be transferred in ms word all the data found in excel.
All the numbers at the end is unique. So what was planning to so is just take the numbers out. As you can see is range from 3 to 5 number. Is there a formula to just pull the numbers out? max