VBE313
Well-known Member
- Joined
- Mar 22, 2019
- Messages
- 686
- Office Version
- 365
- Platform
- Windows
Code:
Sub test4opsgroup()
Application.ScreenUpdating = False
ActiveSheet.unprotect
Dim cl As Object
Dim l As Long, strCells As String
Dim strpart As String
Dim min As Range
Dim numrows As Long
Dim numcolumns As Long
Dim partnum As Range
Dim Qty As Range
ActiveSheet.Range("T2").Select
For Each cl In ActiveSheet.Range("OpsGroup")
l = ActiveCell.Row
strCells = "T" & l
Range(strCells).Select
If ActiveCell.Value = "" Then
Application.ScreenUpdating = True
Exit Sub
Else
End If
R
If ActiveCell.Value = "TOP LEVEL" Then
ActiveCell.Offset(0, -1).Select
Set partnum = ActiveCell
Range("AB" & Rows.Count).End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveCell = partnum
Range("AC" & Rows.Count).End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveCell = partnum
Range(strCells).Select
Else
If ActiveCell.Value <> "TOP LEVEL" Then
Range("AB" & Rows.Count).End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveCell = partnum
Range(strCells).Select
Else
End If
End If
ActiveCell.Offset(1, 0).Select
Next cl
Application.ScreenUpdating = True
ActiveSheet.Protect
End Sub
Last edited by a moderator: