+ Reply to Thread
Results 1 to 7 of 7

Find & Replace in all Workbook (Read all Names from Specific Column)

  1. #1
    Registered User
    Join Date
    07-09-2011
    Location
    Manheim
    MS-Off Ver
    Excel 2010
    Posts
    23

    Find & Replace in all Workbook (Read all Names from Specific Column)

    Hi all,

    I have four tabs (2009, 2010, 2011, 2012) with more than 2000 rows with names mixed with characters in parenthesis and codes (lets call them mixed-names) in columns (B1:B2000). In another tab: References, I have a column (D1:D1500) with names (lets call them unique names) which are part of the 'mixed-names'.

    Just an example: Mixed names: BbExcelforum(04356), tta56(VBAexcel)&port

    Unique Names: Excelforum, VBAexcel (which are recorded in the tab: References, Column D1:D1500).

    Is there any way to read the names in column D1:D1500 (if they are part of the mixed names) and replace the mixed names with the unique names?

    I have found this code but this only reads manually and I have to specify each time the type of search I want, but with 1500 names..its being quite tough.

    Sub ReplaceAll()

    Dim Wks As Worksheet

    For Each Wks In Worksheets
    If Wks.Name <> "Sheet1" Then
    Wks.UsedRange.Replace _
    What:="TIA", Replacement:="TI/A", _
    SearchOrder:=xlByColumns, MatchCase:=True
    Wks.UsedRange.Replace _
    What:="TI.A", Replacement:="TI/A", _
    SearchOrder:=xlByColumns, MatchCase:=True
    End If
    Next Wks

    End Sub
    Any help? Thanks a lot.
    Last edited by dim06; 02-28-2012 at 08:44 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Find & Replace in all Workbook (Read all Names from Specific Column)

    Attach a sample file with dummy data so we can help you better.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    07-09-2011
    Location
    Manheim
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Find & Replace in all Workbook (Read all Names from Specific Column)

    sample.xlsx

    I attached the file, I give only a sample; the rows are over 2000 in my original one but the format is the one I have attached here. Thank you very much, I am pleased for your effort

  4. #4
    Registered User
    Join Date
    07-09-2011
    Location
    Manheim
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Find & Replace in all Workbook (Read all Names from Specific Column)

    any help? I am afraid there is no similar post in the past

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Find & Replace in all Workbook (Read all Names from Specific Column)

    Hi dim06. Try it
    Please Login or Register  to view this content.
    And dim06, please edit your post #1 (add code tags).

  6. #6
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Find & Replace in all Workbook (Read all Names from Specific Column)

    There was a silmilar query in this forum and I have incorporated the solution formula in your w.book. Again I don't remember who gave that answer. It is not me anyway
    Attached Files Attached Files
    regards

    johnjohns

    When you are not sure where to go, every road takes you there!

  7. #7
    Registered User
    Join Date
    07-09-2011
    Location
    Manheim
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Find & Replace in all Workbook (Read all Names from Specific Column)

    Thanks a lot. I am deeply pleased for your time. I will try and I will post

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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