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...
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...
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...
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"...
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...
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...
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...
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...
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...
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...
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 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.