Knockoutpie
Board Regular
- Joined
- Sep 10, 2018
- Messages
- 116
- Office Version
- 365
- Platform
- Windows
@DanteAmor
Hi all,
wondering if you could help me modify something Dante whipped up for me a long time ago.
instead of replacing all values with criteria in BF and replacement in BH, is it possible to only replace values for G:BE if BI contains "N"
Loop - Select row, find value, replace value - previous post
this is the code i'm currently using which replaces all values in all rows.
Hi all,
wondering if you could help me modify something Dante whipped up for me a long time ago.
instead of replacing all values with criteria in BF and replacement in BH, is it possible to only replace values for G:BE if BI contains "N"
Loop - Select row, find value, replace value - previous post
this is the code i'm currently using which replaces all values in all rows.
VBA Code:
Dim ws1 As Worksheet
Set ws1 = ActiveWorkbook.Sheets("Sheet1")
Worksheets("Sheet1").Activate
Dim i As Long
For i = 4 To Range("D" & Rows.Count).End(3).Row
If Range("BF" & i).Value <> "" And Range("BH" & i).Value <> "" Then
Range("G" & i & ":BF" & i).Replace Range("BF" & i).Value, Range("BH" & i).Value, xlPart
End If
Next