Results 1 to 2 of 2

Thread: Need help

  1. #1
    Join Date
    Jun 2011
    Posts
    1

    Unanswered: Need help

    Hi all. I would like to use VBA to check a column of values (Column A) for a value (Papaya) and replace a common value(Fruit) in another column which contains values already at the same row. Thanks.

    From:
    Item Type
    Papaya Vegetable
    Chilli Vegetable
    Papaya Vegetable
    Cabbage Vegetable
    Potato Vegetable
    Cabbage Vegetable

    To:
    Item Type
    Papaya Fruit
    Chilli Vegetable
    Papaya Fruit
    Cabbage Vegetable
    Potato Vegetable
    Cabbage Vegetable

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi,

    Turn on the macro recorder and then record yourself performing these steps manually:

    • Select column A
    • CTRL+F
    • Replace Tab
    • Find What: Papaya Vegetable
    • Replace With: Papaya Fruit
    • Replace All
    • Close
    Then it's just a case of reviewing the code that the macro recorder has generated and tidying it up a little.

    Let us know how you get on....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •