S
Scott Wagner
In a previous post Don Guillett helped me and provided the following code. I
need to change this macro, but don't have a clue how. Hoping you can help.
Sub fillinblanksN()
lr = Cells(Rows.Count, "c").End(xlUp).Row
For Each c In Range("d2:d" & lr)
If Len(c) < 2 Then
c.Offset(0, -3) = c.Offset(-1, -3)
c.Offset(0, -2) = c.Offset(-1, -2)
End If
Next
End Sub
There are lines in my sheet now that have a designation (ColA) that I need
to delete when this macro runs. In the example below I'm focusing on the two
"panelboard" lines. Take a look and let me know if you know how to solve
this issue. ??? .EntireRow.Delete ???
Below is an example
What I have now:
ColA ColB ColC ColD
1 Starter Open Type
3 XFMR Dry Type
AAA 4 Panelboard Type B
1 Box
1 Trim
BBB 2 Panelboard Type Q
1 Box
1 Trim
1 Ground Bar
What it looks like after macro above runs:
ColA ColB ColC ColD
1 Starter Open Type
3 XFMR Dry Type
AAA 4 Panelboard Type B
AAA 4 Box
AAA 4 Trim
BBB 2 Panelboard Type Q
BBB 2 Box
BBB 2 Trim
BBB 2 Ground Bar
What I need to end up with:
ColA ColB ColC ColD
1 Starter Open Type
3 XFMR Dry Type
AAA 4 Box
AAA 4 Trim
BBB 2 Box
BBB 2 Trim
BBB 2 Ground Bar
need to change this macro, but don't have a clue how. Hoping you can help.
Sub fillinblanksN()
lr = Cells(Rows.Count, "c").End(xlUp).Row
For Each c In Range("d2:d" & lr)
If Len(c) < 2 Then
c.Offset(0, -3) = c.Offset(-1, -3)
c.Offset(0, -2) = c.Offset(-1, -2)
End If
Next
End Sub
There are lines in my sheet now that have a designation (ColA) that I need
to delete when this macro runs. In the example below I'm focusing on the two
"panelboard" lines. Take a look and let me know if you know how to solve
this issue. ??? .EntireRow.Delete ???
Below is an example
What I have now:
ColA ColB ColC ColD
1 Starter Open Type
3 XFMR Dry Type
AAA 4 Panelboard Type B
1 Box
1 Trim
BBB 2 Panelboard Type Q
1 Box
1 Trim
1 Ground Bar
What it looks like after macro above runs:
ColA ColB ColC ColD
1 Starter Open Type
3 XFMR Dry Type
AAA 4 Panelboard Type B
AAA 4 Box
AAA 4 Trim
BBB 2 Panelboard Type Q
BBB 2 Box
BBB 2 Trim
BBB 2 Ground Bar
What I need to end up with:
ColA ColB ColC ColD
1 Starter Open Type
3 XFMR Dry Type
AAA 4 Box
AAA 4 Trim
BBB 2 Box
BBB 2 Trim
BBB 2 Ground Bar