abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,429
- Office Version
- 2019
- 2010
- Platform
- Windows
hello
i have this code to transfer data from sheet to another the problem when i fill data more than brand in my invoice it only transfers one row while i have more than two rows it supposes transferring theses rows to another sheet i no know where is the problem
i have this code to transfer data from sheet to another the problem when i fill data more than brand in my invoice it only transfers one row while i have more than two rows it supposes transferring theses rows to another sheet i no know where is the problem
VBA Code:
Sub REDA()
Application.ScreenUpdating = False
Dim iRow As Long
iRow = Sheets("sls").Range("C1048576").End(xlUp).Row + 1
With ThisWorkbook.Sheets("SLS")
.Range("B" & iRow).Value = iRow - 1
.Range("C" & iRow).Value = Sheets("INV").Range("D7").Value
.Range("D" & iRow).Value = Sheets("INV").Range("D8").Value
.Range("E" & iRow).Value = Sheets("INV").Range("C14").Value
.Range("F" & iRow).Value = Sheets("INV").Range("D14").Value
.Range("G" & iRow).Value = Sheets("INV").Range("E14").Value
.Range("H" & iRow).Value = Sheets("INV").Range("F14").Value
.Range("I" & iRow).Value = Sheets("INV").Range("G14").Value
.Range("J" & iRow).Value = Sheets("INV").Range("G24").Value
.Range("K" & iRow).Value = Sheets("INV").Range("G25").Value
.Range("L" & iRow).Value = Sheets("INV").Range("G26").Value
.Range("M" & iRow).Value = Sheets("INV").Range("G27").Value
End With
end sub