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: 1
Default Help!! code to paste


Hi,

I have 2 workbooks.

In the first workbook, it is divided into several worksheets b
person's name. Under each person's name, it has a list of accoun
numbers like this:

5-11111
5-22222
5-12345
etc.

In the second workbook, I have account numbers and correspondin
personnel next to them. I have coded it so that it will match th
account numbers from workbook1 with that of workbook2 and copy th
personnel information next to its account. The last step is to past
this information next to the account number in workbook1. Please hel
me finish this!! Thanks in advance


Sub GetPersonnel()

Dim intRec As Integer, rngData As Range, rngItem As Range
rngAccounts As Range, rngOut As Range
Dim mysht As Worksheet

Application.ScreenUpdating = False

For Each mysht In ThisWorkbook.Worksheets
With mysht
Set rngData = .Range("A70"
.Range("A500").End(xlUp)).SpecialCells(xlCellTypeC onstants)
End With
With Workbooks("Intermediary - PWC").Worksheets("sheet3")
Set rngAccounts = .Range("A1:A"
.Range("A65536").End(xlUp).Row)
End With

For Each rngItem In rngAccounts
Set rngOut = rngData.Find(What:=rngItem)

If Not rngOut Is Nothing Then
rngOut.Offset(0, 2).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy

'need extra code here!!

Else
End If

Next rngItem
Next mysht
End Su

--
Sethaholi
-----------------------------------------------------------------------
Sethaholic's Profile: http://www.excelforum.com/member.php...fo&userid=2511
View this thread: http://www.excelforum.com/showthread.php?threadid=38911

 
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
paste code scrabtree23[_3_] Excel Programming 1 November 21st 04 04:07 AM
Help-Copy&Paste code Bourbon[_30_] Excel Programming 2 January 29th 04 02:47 PM
Paste Code Todd Huttenstine[_2_] Excel Programming 1 December 18th 03 09:17 PM
Where do I paste this Code? Kevin Excel Programming 5 October 22nd 03 04:08 AM
Need Help with Code - Copy & Paste JStone0218 Excel Programming 10 October 11th 03 04:09 PM


All times are GMT +1. The time now is 06:51 PM.

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

About Us

"It's about Microsoft Excel"