rodrigo_m_almeida
New Member
- Joined
- Jan 13, 2022
- Messages
- 42
- Office Version
- 2021
- Platform
- Windows
Good Morning,
I need to inform that the range is the column of rows of each date in the tables...
Does anyone have any idea how I could do this ?
Code :
I need to inform that the range is the column of rows of each date in the tables...
Does anyone have any idea how I could do this ?
Code :
VBA Code:
Public Sub ABC123()
Dim xDate, xLine, xType, xQnty, L As Integer, xRange As Range
L = 2
Do Until IsEmpty(Cells(L, 1))
Worksheets(1).Activate
xDate = Cells(L, 1)
xLine = Cells(L, 2)
xType = Cells(L, 3)
xQnty = Cells(L, 4)
Worksheets(2).Activate
xRange = Rows(3).Find(xDate).EntireColumn
Range(xRange).Find(xLine, , , xType).Offset(, 2) = xQuanty
L = L + 1
Loop
End Sub