Helppppp, it seems simple, but
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Helppppp, it seems simple, but

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    Chile
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I have a process that I am having repeat numerous times. it is in a search of a range I specify (a2:a10) and that it looks (search) for the content of a cell specifies (b2) and it replaces by the content of a cell specifies (c2).
    ¿How I make to change the values of the cells (b2, c2) to (b3, c3) to (b4,c4)etc ?
    please help.
    i try this
    Dim celdaA As Range
    Dim celdaD As Range
    Dim celdaB As Range
    Set celdaA = Worksheets("Datos DWG").Range("a2:a100")
    Set celdaD = Worksheets("Datos DWG").Range("d2") Set celdaB = Worksheets("Datos DWG").Range("b2")
    With celdaA
    Set c = .Find(celdaB, LookIn:=xlValues)
    If Not c Is Nothing Then
    firstAddress = c.Address
    c.Value = celdaD
    Set c = .FindNext(c)
    End If
    End With

    End Sub
    thanks , thank you very much by any aid or suggestion
    Pedro

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Posts
    75
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-19 11:37, trauco wrote:
    I have a process that I am having repeat numerous times. it is in a search of a range I specify (a2:a10) and that it looks (search) for the content of a cell specifies (b2) and it replaces by the content of a cell specifies (c2).
    ¿How I make to change the values of the cells (b2, c2) to (b3, c3) to (b4,c4)etc ?
    please help.
    i try this
    Dim celdaA As Range
    Dim celdaD As Range
    Dim celdaB As Range
    Set celdaA = Worksheets("Datos DWG").Range("a2:a100")
    Set celdaD = Worksheets("Datos DWG").Range("d2") Set celdaB = Worksheets("Datos DWG").Range("b2")
    With celdaA
    Set c = .Find(celdaB, LookIn:=xlValues)
    If Not c Is Nothing Then
    firstAddress = c.Address
    c.Value = celdaD
    Set c = .FindNext(c)
    End If
    End With

    End Sub
    thanks , thank you very much by any aid or suggestion
    Pedro
    I think I know what you need here. If you still have trouble, try the Spanish board that Juan Pablo G. runs.

    I assumed that you wanted to replace the values located in B2:B10 with the corresponding values in D2:D10.

    Dim celdaA As Range
    Dim celdaD As Range
    Dim celdaB As Range

    For i = 2 to 10 ' or whatever you need

    Set celdaA = Worksheets("Datos DWG").Range("a2:a100")
    Set celdaD = Worksheets("Datos DWG").Cells(i,4) ' From D2 to D10
    Set celdaB = Worksheets("Datos DWG").Cells(i,2) ' From B2 to B10

    With celdaA
    Set c = .Find(celdaB, LookIn:=xlValues)
    If Not c Is Nothing Then
    firstAddress = c.Address
    c.Value = celdaD
    Set c = .FindNext(c)
    End If
    End With
    Next i
    End Sub


    "Interfere? Of course we should interfere! Always do what you're best at, that's what I say!" -- The Doctor, Nightmare of Eden

  3. #3
    New Member
    Join Date
    Apr 2002
    Location
    Chile
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Yesss
    Thanks, thanks, thanks
    Thanks for your help Tim!!!

    gracias amigo
    un abrazo de Chile

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com