+ Reply to Thread
Results 1 to 4 of 4

Find/Replace in Excel

  1. #1
    Registered User
    Join Date
    01-11-2017
    Location
    London, England
    MS-Off Ver
    2003,2007,2010,2013
    Posts
    65

    Lightbulb Find/Replace in Excel

    Hi all,

    i'm trying to find a sample way to do find and rename process on excel file with a specific modifications

    i need o look for a cell then rename the cell under it

    for ex,

    look for (English Section details) then rename the cell under it to (English Terms) as shown below on screenshot


    0.png

    i hope if anyone can help or give me any hint

    thanks in advance

    cheers

    Ethen




    Cross-Posting: http://www.vbaexpress.com/forum/show...315#post357315
    Last edited by Ethen5155; 02-24-2017 at 06:01 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Find/Replace in Excel

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    01-11-2017
    Location
    London, England
    MS-Off Ver
    2003,2007,2010,2013
    Posts
    65

    Re: Find/Replace in Excel

    Dear mehmetcik ,

    Thanks a lot for your reply, but i tried your code but it seems do the change to some cells and other don't

    another thing to mention and that was my fault, i want to look for for any cell contains text "English Section details" then check if the cell under it contains text "Terms" ------> if yes then edit the text to "English Terms".

    thanks in advance for your efforts

    Cheers

  4. #4
    Registered User
    Join Date
    01-11-2017
    Location
    London, England
    MS-Off Ver
    2003,2007,2010,2013
    Posts
    65

    Re: Find/Replace in Excel

    Solved by Paul_Hossler:


    Option Explicit
    Sub Change_Text()

    Dim rCell As Range

    Application.ScreenUpdating = False

    For Each rCell In Worksheets("Sheet1").UsedRange.Cells
    If VarType(rCell.Value) <> vbString Then GoTo GetNextCell
    If LCase(Trim(rCell.Value)) <> "english section details" Then GoTo GetNextCell
    If LCase(Trim(rCell.Offset(1, 0).Value)) <> "term" Then GoTo GetNextCell

    rCell.Offset(1, 0) = "English Terms"
    'rCell.Offset(1, 0).Interior.Color = vbRed <<<< just for testing
    GetNextCell:
    Next

    Application.ScreenUpdating = True
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Find and replace where contents a formula so can't be seen by Find and replace.
    By markDuffy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2015, 02:24 PM
  2. Replies: 16
    Last Post: 12-02-2014, 03:38 PM
  3. Replies: 3
    Last Post: 11-25-2014, 06:08 AM
  4. Excel VBA find and replace
    By jimbojames136 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-19-2014, 08:23 AM
  5. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM
  6. Find/Replace in Excel
    By margemynx3 in forum Excel General
    Replies: 5
    Last Post: 11-29-2007, 12:02 AM
  7. Excel Find and Replace
    By Donna in forum Excel General
    Replies: 1
    Last Post: 12-01-2005, 01:35 AM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1