Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with overflow
I want to search a column with one row indicator and for every row search
though another column and paste that value to the new (row,column) I have tried this using two do-loops and one for each next-solution and one do loop but I get an overflow problem. Can you help me? Thanks. /Peter Private Sub cmdData2_Click() Dim Counter As Integer Dim Row101 As Integer Dim Row102 As Integer Dim Row111 As Integer Dim Rad As Variant Dim Col109 As Integer Dim Col110 As Integer Dim Col114 As Integer Dim Col115 As Integer Row101 = 1844 Row102 = 1844 Row111 = 2504 Counter = 1158 Col109 = 9 Col110 = 10 Col114 = 14 Col115 = 15 For Each Rad In Range(Cells(Row102, Col115), Cells(Row111, Col115)) Do If Worksheets("Bure").Cells(Counter, Col109).Value = Worksheets("Bure").Cells(Rad, Col114).Value Then Range(Cells(Counter, Col110), Cells(Counter, Col110)).Copy Range(Cells(Rad, Col115), Cells(Rad, Col115)).PasteSpecial (xlPasteAll) End If Counter = Counter + 1 Loop Until Counter = 2505 Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help! Overflow Error 6 | Excel Programming | |||
Overflow Problem | Excel Programming | |||
VBA overflow | Excel Programming | |||
VBA overflow | Excel Programming |