selection.replace

  1. BAKELOVEMORE

    Capturing result in cell from formula and Selection.Replace

    I have the following Selection.Replace code that I have used in other subs but I cannot figure out how to capture the cell contents from a formula and pass it to Selection. I have used Range(activeRow,"H").copy and Selection.copy and passing formula to another variable. I have used .text in all...
  2. G

    Macro using Find/Replace to enter a function

    I have a small macro that uses the State entries to add Sales Regions to a spreadsheet. The macro adds a new column right of the Zip Code column, copies over the States and then uses the find/replace function to enter the Sales Regions. It's most likely not the most efficient method but it...
  3. D

    Need my code to loop through all sheets

    Hi Masters of Excel, I can't seem to find a way to have my code loop through all sheets in a workbook. I've never worked with loops before. What I have tried only goes to sheet 2 so I have removed that. Any thoughts to get me in the right direction. Here is the code I am hoping to execute on...
  4. K

    Hyperlink to run macro does not run

    I have the following hyperlink in sheet named 'Process' in cell B34: Text to Display: CLICK HERE TO PERFORM THE FOLLOWING: Type the cell reference: B34 The macro code is: Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink) If Target.Range.Address = "$B$34"...
  5. 1

    Recorded vba for "replace text" does not work

    Hi, I have some VBA code that loops through column D and uses the values in range B:X. My problem is that sometimes, the value in some of the cells will have the error #DIVISION/0!. This stops my loop and creates an error. My solution to this was to put the below code before rendering the rest...
  6. A

    VBA for cell text formatting based on another column's cell values

    Dear Excel Community, Currently I have the following formulas for formatting text in each cell within a certain column. Selection.Replace What:=Chr(10) & Chr(10), Replacement:=Chr(10), LookAt:=xlPart Selection.Replace What:=Chr(10), Replacement:=" " However I wish to combine this process...
  7. S

    Replacing characters from a copied text file

    Hi My first post in this glorious forum so please be gentle :) I'm trying to get Excel to copy data from a text file and then arranging it for me, and it works like a charm. Except for 2 things! The characters ┼ and ─ seems impossible to replace :( I have figured out that they should be ANSI...
  8. D

    Combing 2 Columns That Contain Over 16 Numbers And Have Them Display Correctly

    I have 2 columns that I am combing via VBA, the first column contains invoice numbers that are 7 digits long and the second column contains part numbers that are 12 digits long and contain a "-" and a "*". Everything works fine until I remove the "-" and the "*", I get a bunch of "#"'s and if I...
  9. B

    Replace VBA

    Ia a way to combine the following two codes. i.e. Replace "th" or "rd" with "" <colgroup><col width="72" style="width:54pt"></colgroup><tbody> Selection.Replace What:="th", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True...
  10. S

    VBA: How do I stop this code from doing all of the screen flicking?

    I recorded this macro a little while ago, and I'm hoping someone can help me clean it up a little bit. What this macro does when it starts is it does all the screen flicking that hit the code when I was recording it. I'm getting a little better with VBA, and have been making my additions to the...
  11. sobieskitech

    Help with building double if statement

    Hello all, I've looked for solutions to this is the Forum and have probably just missed it. With the example below I would like to do the following: 1. Look in column D and if the first 3 characters of the cell is BAL then, 2. Look in column C and determine if the character preceding the dash...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top