Results 1 to 4 of 4

Thread: How to find replace text in Excel

  1. #1
    Join Date
    Dec 2011
    Posts
    64

    How to find replace text in Excel

    Hi friends recently while using excel I was trying to find the replace text in my excel sheet, but however I can’t able to find the replace text in Excel. So I just want to know is it possible to create macros that find the replaced text in Excel. So how to find text or symbol in each cell and replace with hard carriage return

  2. #2
    Join Date
    Jun 2011
    Posts
    798

    Re: How to find replace text in Excel

    You could use edit and replace. Say that you wanted to replace the pound sign (#) with the hard line break (CHAR(10)). First, select the cells containing the data to be changed, then: <Edit> <Replace> In the "Find What" box, enter # And in the "Replace With" box, enter <ALT>0010 Using the numbers on the num keypad, *not* the numbers under the function keys. You will not see anything displayed in the "Replace With" box, but click "Replace All". You should see your data wrapped in the cell. If not, go to: <Format> <Cells> <Alignment> tab, And click in "Word Wrap", then <OK>.

  3. #3
    Join Date
    Dec 2011
    Posts
    64

    Re: How to find replace text in Excel

    I have this same questions and this answer did not work for me. It is inserting"<alt>0010". Not a hard return. Please help

  4. #4
    Join Date
    Jun 2011
    Posts
    635

    Re: How to find replace text in Excel

    I have this same questions and this answer did not work for me. It is inserting"<alt>0010". Not a hard return. Please help
    If you're sure that the value exists in the selection, you can use
    something like:

    Selection.Find( _
    What:=Sheets("Sheet2").Range("A1").Value, _
    LookIn:=xlValues, _
    LookAt:=xlPart, _
    SearchOrder:=xlByRows, _
    SearchDirection:=xlNext, _
    MatchCase:= False).Activate


    However, if it doesn't, you'll get an error. You can use a variable to
    check if it exists:

    Dim rFound As Range
    Set rFound = Selection.Find( _
    What:=Sheets("Sheet2").Range("A1").Value, _
    LookIn:=xlValues, _
    LookAt:=xlPart, _
    SearchOrder:=xlByRows, _
    SearchDirection:=xlNext, _
    MatchCase:= False)
    If rFound Is Nothing Then
    MsgBox """" & Sheets("Sheet2").Range("A1").Value & _
    """ was not found."
    Else
    rFound.Activate
    End If

Similar Threads

  1. Find / Replace in Excel 2007
    By KALANI84 in forum Windows Software
    Replies: 4
    Last Post: 21-03-2012, 01:32 AM
  2. Finding replace text or symbol with carriage return in Excel
    By DEvOTeEL in forum MS Office Support
    Replies: 5
    Last Post: 23-02-2012, 12:19 PM
  3. Replies: 2
    Last Post: 17-02-2012, 01:03 PM
  4. How to find Hidden Text Box in Microsoft Excel
    By Lanka Boy in forum MS Office Support
    Replies: 2
    Last Post: 14-01-2012, 04:07 PM
  5. Need to find and replace text in MySQL database
    By Adamaris in forum Software Development
    Replies: 3
    Last Post: 20-05-2009, 10:59 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,505,184.70313 seconds with 17 queries