JODomingos
New Member
- Joined
- Jul 11, 2020
- Messages
- 48
- Office Version
- 2016
- Platform
- Windows
Hi Fellows!
I'm stuck in this script, I can not solve.
The point is: I need to check in many columns if there is the string "./.", in case of having then replace it by the last row in its column (Yellow), which contains the average. I can do it one by one but I need to perform this several times (4723times). I could not develop a loop for that. After finished the replacement for the class A, i have to move to class B e perform the same script.
Could you help me?
Below follows my script
Sub replace()
Dim C As Range
Dim grupo As Range
Set grupo = Range(ActiveCell, ActiveCell.End(xlDown))
Application.ScreenUpdating = False
For Each C In grupo
If C = "./." Then C = ActiveCell.End(xlDown).Value
Next C
ActiveCell.Offset(0, 1).Select
Application.ScreenUpdating = True
End Sub
Really thanks
I'm stuck in this script, I can not solve.
The point is: I need to check in many columns if there is the string "./.", in case of having then replace it by the last row in its column (Yellow), which contains the average. I can do it one by one but I need to perform this several times (4723times). I could not develop a loop for that. After finished the replacement for the class A, i have to move to class B e perform the same script.
Could you help me?
Below follows my script
Sub replace()
Dim C As Range
Dim grupo As Range
Set grupo = Range(ActiveCell, ActiveCell.End(xlDown))
Application.ScreenUpdating = False
For Each C In grupo
If C = "./." Then C = ActiveCell.End(xlDown).Value
Next C
ActiveCell.Offset(0, 1).Select
Application.ScreenUpdating = True
End Sub
Really thanks