Hi all,
Kindly help me with the following error.
I am trying to copy one value from sh1 and paste it in a common sheet (sh2) for every value in sh2.I am repeating the process for all the value in sh1. Sh1,sh2,sh3 are defined as worksheets and open.
"k = sh1.Range("A1", sh1.Range("A1").End(xlDown)).Rows.Count
l = sh2.Range("J1", sh2.Range("J1").End(xlDown)).Rows.Count
For i = 2 To k
For j = 2 To l
sh1.Cells(i, 1).Copy Destination:=sh3.Cells(x, 1).Paste 'won,k,i
sh2.Cells(j, 1).Copy Destination:=sh3.Cells(x, 2).Paste 'month,j,l
x = x + 1
Next j
Next i"
But it is throwing a Runtime error:object defined or application defined error.
Kindly help me to find out whats wrong.
Bookmarks