![]() |
|
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
![]()
I have this macro that works for me, the only thing, if I have 5 pages long of table(s), it takes for ever to do it 1 by 1 on each $ or %.
In a nut shell, I need to find $ or % in a table, then move it to the next cell which I've already created an empty column. I wish I could show an example of a table picture, but I don't know how. Normally Find and Replace, Execute All at once. What can I do to have it do it all at once? This is my macro..... Sub Change_Value_to_Next_Cell_GOOD() '33 'Change_Value_to_Next_Cell Macro ' I can change the % or $ or any string of text and have it copy, cut, and paste to the next cell. ' Alt+2 ' Dim sText As String sText = InputBox("Enter text to move cell") Selection.Find.ClearFormatting With Selection.Find .Text = sText .Wrap = wdFindStop End With Do While Selection.Find.Execute If Selection.Information(wdWithInTable) = True Then Selection.Copy Selection.Cut Selection.MoveRight Unit:=wdCell Selection.PasteAndFormat (wdFormatOriginalFormatting) Selection.Move Unit:=wdCell, Count:=1 End If Loop MsgBox " You're Selection is Done in the Active Document!" On Error GoTo 0 End Sub Any insight would be appreciated. Oh an added bonus, if I can find multiple values at once, such as if found $ or %, or another value, cut move to next cell, then paste. P.S.1 Reason we must move the $ or % to the next cell, is because that is what we do in our French documents. P.S.2 My table example to test a macro, has 5 columns of numbers only, with an extra empty columns on each columns to move in the $. Thanks in advance ![]() Cendrinne Last edited by Cendrinne; 08-19-2019 at 08:45 AM. Reason: Added p.s. 2 |
Tags |
find & replace, help please, speed |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
what method to find all cells paste linked to a certain cell ? | DBenz | Excel | 1 | 06-28-2018 12:16 PM |
Select Cell Text to paste into Find/Replace | CBarry | Word VBA | 2 | 02-16-2017 04:37 AM |
![]() |
amparete13 | PowerPoint | 3 | 03-11-2014 05:29 AM |
macro or find/replace | JamesVenhaus | Word | 2 | 02-27-2012 03:34 PM |
Find and Replace Macro - A Better Way | Tribos | Word VBA | 0 | 10-08-2008 03:22 AM |