PANKAJUTEKAR
Board Regular
- Joined
- Jun 10, 2011
- Messages
- 79
All experts,
Good afternoon all.
The following code i got from Sektor sir.
Now the problem is-
- record need to add from range A16 to range F16 and so on.
- value that are stored in range A16 to range F16 that is as follows,
f6 = a16, f7=b16, f5=c16, f9=d16, f10=e16, f11=f16.
now, every time i try to put this value on every new row i.e- a17 to f17
but following code is properly working.
Require kind solution from experts.
Sub addrecord()
Dim lastRow As Long, arr As Variant
lastRow = Cells(Rows.Count, "A").End(xlUp).Row + 1
If lastRow = 2 Then lastRow = 4
'(ROWINDEX, COLINDEX)
arr = Array(Cells(6, 6), Cells(6, 7), Cells(6, 5), Cells(6, 8), Cells(6, 9), Cells(6, 10))
Cells(lastRow, 4).Resize(, 6) = arr
'Range("F5,F6").ClearContents
End Sub
===========================
I GOT IT EXPERTS......
sORRY FOR DISTRUBING YOU.
tHANK yOU ALL.
Good afternoon all.
The following code i got from Sektor sir.
Now the problem is-
- record need to add from range A16 to range F16 and so on.
- value that are stored in range A16 to range F16 that is as follows,
f6 = a16, f7=b16, f5=c16, f9=d16, f10=e16, f11=f16.
now, every time i try to put this value on every new row i.e- a17 to f17
but following code is properly working.
Require kind solution from experts.
Sub addrecord()
Dim lastRow As Long, arr As Variant
lastRow = Cells(Rows.Count, "A").End(xlUp).Row + 1
If lastRow = 2 Then lastRow = 4
'(ROWINDEX, COLINDEX)
arr = Array(Cells(6, 6), Cells(6, 7), Cells(6, 5), Cells(6, 8), Cells(6, 9), Cells(6, 10))
Cells(lastRow, 4).Resize(, 6) = arr
'Range("F5,F6").ClearContents
End Sub
===========================
I GOT IT EXPERTS......
sORRY FOR DISTRUBING YOU.
tHANK yOU ALL.
Last edited: