I need to offset the first 3 characters in column O to the left, add them infront of the existing text in K (with parenthesis) ONLY WHEN the value in column F is P1
so in the example below, row 2, 7, and 14 have P1 in column F, after I run the macro column F on these rows will look like:
(D B) D Base,6"w
((D J) 58x60",Base,8"w,FT
(C B)C Box,6"w
this is what I have so far, and it is not working properly
so in the example below, row 2, 7, and 14 have P1 in column F, after I run the macro column F on these rows will look like:
(D B) D Base,6"w
((D J) 58x60",Base,8"w,FT
(C B)C Box,6"w
this is what I have so far, and it is not working properly
VBA Code:
public lr6 As Long
public Lr11 As Long
Sub StructureID()
Set rng2 = Range("A1").CurrentRegion
lr6 = rng2.Cells(Rows.Count, "F").End(3).Row
lr11 = rng2.Cells(Rows.Count, "O").End(3).Row
For i = lr6 To 2 Step -1
If rng2.Cells(i, 6) Like "*P1*" Then
lr11.Offset(0, 4).Value = Left(lr11.Value, 3)
End If
Next i
End Sub