Helppppp, it seems simple, but

trauco

New Member
Joined
Apr 18, 2002
Messages
3
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
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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
 
Upvote 0
Yesss
Thanks, thanks, thanks
Thanks for your help Tim!!!

gracias amigo
un abrazo de Chile
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top