mperrah
11-17-2021, 10:50 AM
Hello Team,
I have a range (B:B) with some blank rows.
There is data in columns A:C then E:D are blank then F has data I want to pull from
The data in F is a formula stripping just the first string up to the first space of column B
In column F one row down, I have a value I want entered in the blank rows of Column B
This is what I came up with but it doesn't seem to do anything
Sub Test()
Dim Rng As Range
Dim t As Range
Dim lr As Long
lr = Range("A1").CurrentRegion.Rows.Count
Set Rng = Range("B2:B" & lr)
For Each t In Rng
If t = "" Then
t.Value = t.Offset(-1, 4).Value
End If
Next t
End Sub
I don't get an error, just no change takes place.
Any help is greatly appreciated.
Mark
I have a range (B:B) with some blank rows.
There is data in columns A:C then E:D are blank then F has data I want to pull from
The data in F is a formula stripping just the first string up to the first space of column B
In column F one row down, I have a value I want entered in the blank rows of Column B
This is what I came up with but it doesn't seem to do anything
Sub Test()
Dim Rng As Range
Dim t As Range
Dim lr As Long
lr = Range("A1").CurrentRegion.Rows.Count
Set Rng = Range("B2:B" & lr)
For Each t In Rng
If t = "" Then
t.Value = t.Offset(-1, 4).Value
End If
Next t
End Sub
I don't get an error, just no change takes place.
Any help is greatly appreciated.
Mark