+ Reply to Thread
Results 1 to 4 of 4

Excel 2010 vba to find values in a column and change it

  1. #1
    Registered User
    Join Date
    04-16-2012
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    15

    Excel 2010 vba to find values in a column and change it

    Hi,

    I have an excel spreadsheet.CORRECT-DIVISION.JPG
    One of the columns is Division. It has some values.
    I need to find a value U& & Switzerland and then change all of them to UK & Switzerland.

    How do I do it?

    I have also attached a screenshot of my excel file.

    Thanks.

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Excel 2010 vba to find values in a column and change it

    Make a copy of your workbook and test on your copy.

    1. Copy U& & Switzerland
    2. Ctrl+F to open the find & replace utility
    3. In the Find field, paste No. 1 above.
    4. In the replace field paste UK & Switzerland
    5. Click Replace All
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Registered User
    Join Date
    04-16-2012
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Excel 2010 vba to find values in a column and change it

    Thanks for your response. I recorded a macro that worked successfully. Thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    11-15-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2003
    Posts
    538

    Re: Excel 2010 vba to find values in a column and change it

    If you want VBA and programming ...
    Select column A and name it as rngDivision
    Then try
    Please Login or Register  to view this content.
    Obviously the debug.print can be removed.
    Last edited by Oppressed1; 05-17-2012 at 12:19 PM. Reason: Added last line

+ 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