+ Reply to Thread
Results 1 to 2 of 2

Macro to Find value in Col-A and then Change value in Col-B

  1. #1
    Registered User
    Join Date
    11-08-2004
    Posts
    6

    Macro to Find value in Col-A and then Change value in Col-B

    Hello,

    Looking for code that will look in Col-A for the value = Apples, and if found,
    will go to Col-B (on the same row where Apples was just found) and change
    the cell to Oranges.

    Col-A will contain the word Apples multiple times, and the word Apples will be
    in a Cell all by itself. There are other fruits in Col-A, but only care about finding
    any cell in Col-A that has the word Apples, and then going to Col-B and changing
    the cell to Oranges !

    Thanks,

    Sherry

  2. #2
    Registered User
    Join Date
    09-23-2004
    Posts
    65
    eg from cell A1 to A10 on the apples sheet


    For i = 1 to 10
    Cells(i, 1).Activate
    If ActiveCell.Value = "Apple"Then
    ActiveCell.Offset(0,1).Value="Oranges"
    End If
    Next

    Could be that you have to use .Formule instead of .Value

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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