1. B

    Mismatch Error w/ REPLACE Function

    Hello, I am working on a macro to edit a fixed width text file. What I want my macro to do is loop through each line of the text file (copy and pasted into column A) and replace a value IF the value of "RecordType" = 1. However, the line with the Replace function returns a mismatch error. Any...
  2. S

    VBA Replace needs Sheet to be active, why?

    HI My issue is it only replaces all instances on the ActiveSheet oSht.Cells should allow it to work on all cells on oSht Short Version Change: For Each oSht In ThisWorkbook.Worksheets oSht.Activate oSht.Cells.Replace What.... into For Each oSht In...
  3. The_Rock

    Random Replace Characters in a Word

    Hi Folks I've been scouring the net but without success. I'm hoping the genius's here will be able to help me :-) I'm trying to mock up some work for my daughter to help her with Synonyms and Antonyms. What I would like to do, if possible is: Column D looks at Column F (which will be hidden)...
  4. P

    Replace and Find VBA code for a command button

    Hi goodmorning all, hope you can help me place I have cells which sometimes has forexample -1, -4, -3 in them the range is cellsB24:P39, so what I do at the moment manually is CTRL F (find and replace) clickon replace tab – in find what enter (-*) and in replace with enter (0) thenreplace all...
  5. H

    Replace all numbers with zero, except formulas

    I have a specified range selected. Range(ActiveCell.Offset(0, -9), ActiveCell.Offset(0, -3)).EntireColumn.Select Now, I have to replace all numbers with zero in the above range, except formulas. Can anyone help me?
  6. M

    Creation of IP Address Ranges

    I am trying to automate the ability to create IP address ranges An example Cell A1 has the value of In cell B1 I want to keep the first 3 octets and replace the last octet with 10 (end result for B1 is In cell C1 I want to keep the first 3 octets and replace the last...
  7. davewatson86

    Date issues

    Hello all i have a report that is giving me dates in the format of DD.MM.YYYY i am trying to convert this to a date format that excel will work with but i am getting some strange tings happening. i have used find replace to replace . with / but some dates are showing in a format of MM/DD/YYYY...
  8. D

    Replace HYPERLINK formula with button

    I've created a link with the HYPERLINK formula which is using customer IDs from another cell inside the Hyperlink. Works like a charm. Now I've been trying to make the Excel a bit nicer looking. Is there any way to replace the links with a button or a button-like graphic so it doesn't just look...
  9. G

    Finding each cell where a style is used

    Hello, I am trying to find each location where a style is used and SELECTIVELY replace that style (one by one, manually) with another style. I am not trying to replace all usages of one style with another style, blindly. Is that possible? Many thanks. Keith
  10. T

    VBA to launch userform by selecting a cell

    Hello, I have data sets I want to have code for that if I select a specific column, cell it opens a userform. The data set starts with a number such as 9334231/1 below. It will always vary in length. then another number, just different, indicates start of a new data set. If I was to select...
  11. L

    i need to replace some values in a column

    Hello, first that all excuse me for my bad english ;( I need your help, im new with power BI I have a table named LECTURA that contains a column named SMS. The column SMS have a lot of values, and i need to change the value of a part of it. The values i need to change have the structure...
  12. J

    VBA for Copy/Paste

    Hello! I am struggling with a function to link to a macro that requires me to copy a set of values from one sheet to another, while these values depending on a certain month that I link, and then asking the user a Yes or No question on if they want to replace these stored values for that month...
  13. M

    Remove unwanted characters

    I have a list of phone #'s in the format 519-555-5551 410-555-5222 I would like to remove the dash so the output looks like 5195555551 4105555222 I've tried find and replace but it does not work. Any thoughts? TIA
  14. A

    VBA Code to compare Dates, then run macro to match colums

    Hi, Hope I can get some help with adding code to loop through the dates in column A of Sheet1 & compare them to the dates in Column A, Sheet2. If the date on Sheet2 is greater than Sheet1 run the MatchColumns macro. Sheet1 accumulates jobs with recommendations through out the year. Sheet2...
  15. L

    (substitute, replace) VS replace tool

    Hi I know how and when to use substitute() and replace() function. But my question, I found that Replace tool is doing the same. Is there any case that Replace tool is not going to help then I will have to use substitute() or replace() functions. Thank you very much.
  16. B

    VBA - Find and Replace - is there a better way to do this?

    I have pieced together different bits of code over the past few years to format a P&L report being generated from an accounting system. The vba is starting to run slowly and I'm trying to clean it up to make it run a faster. The report being formatted has 100 tabs and the code formats each tab...
  17. I

    Regex to replace dashs between digits

    i am in the need for a regex for my vba project. i need to replace the - dash that is in-between numbers only, example 1-3-1. The problem is i have negative numbers with dashes which i need to keep, but the patterm is consistent, 1-3-1, should be 1,3,1 so replace dash between digits with a...
  18. 0

    Change cell value on multiple worksheets using a wildcard

    My workbook contains many sheets and before closing the workbook I would like to replace the same cell on all worksheets with the same text. For example, certain cells replace all that start with "rateid_???". I have tried the following code but receive an error on the IF ws.Range…… row. Could...
  19. T

    Help a newcomer to VBA. if statement or equivalent

    I have an excel document that I get every month. I would usually type the formula =IF(Q3="I","Colonial FS Insurance","Colonial 1st State") into cell AB3 then double click the corner to drag down to the last row. The number of rows changes every month and can be anything from 30 to over 2000...
  20. P

    Problem replacing/substituting a part of a String variable with a long text string

    Hi I have a macro which runs some SQL code to update a table on a server. The code and SQL has run fine in the past, but I've hit a road block now, seemingly because SUBSTITUTE doesn't seem to like swapping in a really long string (~35k chars) for a short string into a STRING variable. If...

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...