LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 349
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Overflow Error 6 Gauthier Excel Programming 6 September 24th 04 12:57 PM
Overflow Problem D[_6_] Excel Programming 7 August 11th 04 06:06 PM
VBA overflow Tom Ogilvy Excel Programming 3 September 2nd 03 09:04 PM
VBA overflow Don Guillett[_4_] Excel Programming 2 September 2nd 03 04:19 PM


All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"