Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-10-2018, 01:58 AM
Urraco Urraco is offline Find and replace Windows 8 Find and replace Office 2016
Advanced Beginner
Find and replace
 
Join Date: Apr 2018
Posts: 30
Urraco is on a distinguished road
Default Find and replace


Hi
How can i find and replace simultaneous ^t and ^p whit space. It is posible ?
Thanks
Reply With Quote
  #2  
Old 04-10-2018, 06:09 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Find and replace Windows 10 Find and replace Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 4,005
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

You'll need two find & replace operations, that is, what you are asking can't be done in a single step.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #3  
Old 04-10-2018, 06:21 AM
Urraco Urraco is offline Find and replace Windows 8 Find and replace Office 2016
Advanced Beginner
Find and replace
 
Join Date: Apr 2018
Posts: 30
Urraco is on a distinguished road
Default

Quote:
Originally Posted by Stefan Blom View Post
You'll need two find & replace operations, that is, what you are asking can't be done in s a single step.
...not even with a macros way ?

thanks for reply
Reply With Quote
  #4  
Old 04-10-2018, 06:27 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Find and replace Windows 10 Find and replace Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 4,005
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Even in a macro, two find & replace operations would be required, as far as I can tell. First replace tab characters (^t) with a blank space and then replace paragraph marks (^p) with a blank space. Note that you won't be able to get rid of the very last paragraph mark in a document, because that mark must always be present.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #5  
Old 04-10-2018, 06:37 AM
Urraco Urraco is offline Find and replace Windows 8 Find and replace Office 2016
Advanced Beginner
Find and replace
 
Join Date: Apr 2018
Posts: 30
Urraco is on a distinguished road
Default

Quote:
Originally Posted by Stefan Blom View Post
Even in a macro, two find & replace operations would be required, as far as I can tell. First replace tab characters (^t) with a blank space and then replace paragraph marks (^p) with a blank space. Note that you won't be able to get rid of the very last paragraph mark in a document, because that mark must always be present.
Many thanks
Reply With Quote
  #6  
Old 04-10-2018, 03:57 PM
Guessed's Avatar
Guessed Guessed is offline Find and replace Windows 10 Find and replace Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,159
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

It can be done with a single find and replace. As Stefan pointed out, it won't replace the final paragraph mark though
Find: [^t^13]
Wildcards turned on.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #7  
Old 04-10-2018, 11:45 PM
Urraco Urraco is offline Find and replace Windows 8 Find and replace Office 2016
Advanced Beginner
Find and replace
 
Join Date: Apr 2018
Posts: 30
Urraco is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
It can be done with a single find and replace. As Stefan pointed out, it won't replace the final paragraph mark though
Find: [^t^13]
Wildcards turned on.
That's it!
Good job!
Thanks!
Reply With Quote
  #8  
Old 04-10-2018, 10:31 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Find and replace Windows 10 Find and replace Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 4,005
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Maybe I misunderstood the question. I apologize!

As Guessed pointed ut, of course you can find a tab character immediately followed by a paragraph mark.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #9  
Old 04-10-2018, 11:51 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Find and replace Windows 10 Find and replace Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 4,005
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Apparently I did misunderstand the question. :-(

If you don't need a wildcard find & replace, you can make use of ^t^p in the "Find what" box. You can even use ^w^p which would find any blank space (tab or space character) followed by a paragraph mark.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #10  
Old 04-11-2018, 01:02 AM
Urraco Urraco is offline Find and replace Windows 8 Find and replace Office 2016
Advanced Beginner
Find and replace
 
Join Date: Apr 2018
Posts: 30
Urraco is on a distinguished road
Default

Quote:
Originally Posted by Stefan Blom View Post
Apparently I did misunderstand the question. :-(

If you don't need a wildcard find & replace, you can make use of ^t^p in the "Find what" box. You can even use ^w^p which would find any blank space (tab or space character) followed by a paragraph mark.

I want to convert a multiple columns (table numbers) from Excel into a single paragraph in Word (copy from Excel and paste in Word). Then in Word i use "find and replace" to replace all tabs and paragraphs between my numbers whit spaces character.
^ t ^ p does not work at once in my case
but [^t^13] works
Reply With Quote
  #11  
Old 04-11-2018, 03:04 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Find and replace Windows 10 Find and replace Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 4,005
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

^t^p should definitely work, assuming that you type this string without including any spaces and, as stated previously, you will have to clear the "Use wildcard" option.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #12  
Old 04-13-2018, 01:31 AM
Urraco Urraco is offline Find and replace Windows 8 Find and replace Office 2016
Advanced Beginner
Find and replace
 
Join Date: Apr 2018
Posts: 30
Urraco is on a distinguished road
Default

Quote:
Originally Posted by Stefan Blom View Post
^t^p should definitely work, assuming that you type this string without including any spaces and, as stated previously, you will have to clear the "Use wildcard" option.
sorry but it does not work
example below
Attached Images
File Type: jpg 1.jpg (246.0 KB, 24 views)
Reply With Quote
  #13  
Old 04-13-2018, 01:46 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Find and replace Windows 10 Find and replace Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 4,005
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Your example has no occurrences of a tab character immediately followed by a paragraph mark, which is why ^t^p isn't working.

That is a different kind of search compared to a wildcard search of [^t^13] which defines a range. See for example http://www.gmayor.com/replace_using_wildcards.htm.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #14  
Old 04-13-2018, 11:01 PM
macropod's Avatar
macropod macropod is offline Find and replace Windows 7 64bit Find and replace Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,365
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try a wildcard Find/Replace, where:
Find =([0-9])^13([0-9])
Replace = \1^t\2
to insert tabs where the paragraph breaks are, or:
Replace = \1^l\2
to insert line breaks instead.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
In Find and Replace, can Word stop after each Replace? wardw Word 1 06-08-2017 02:47 PM
Find and replace VBA Batch Find & Replace for all MSOffice extensions, to replace File Name and Content of the File QA_Compliance_Advisor Word VBA 11 09-11-2014 11:51 PM
Find and replace Find what box in Find and replace limits the length of a search term Hoxton118 Word VBA 7 06-10-2014 05:05 AM
Find and replace Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Find and replace Help with find and replace or query and replace shabbaranks Excel 4 03-19-2011 08:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft