LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default VLookup then Transpose

Hi all,

Thanks in advance for your advice.

Ihave two worksheets and I'm attempting to create a sub for a command button
(on worksheet 1) that finds the relevent data from worksheet 2, selects the
range and then Paste/ Transpose's it back onto the original worksheet (1).

The Vlookup function seems to work, but all that gets pasted is the first
cell and the transpose doesnt occur. Could anyone tell me where I'm going
wrong..

This is the code so far:

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False

Range("d10").Select
ActiveCell.Formula = "=VLOOKUP($c7,'Sheet1'!$d$8:$bp$145,1,FALSE)"
ActiveCell.Resize(1, 65).Select

Selection.Copy
Sheets("Sheet2").Activate
Range("d11").Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

Range("a1").Select
Application.ScreenUpdating = True

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
TRANSPOSE 'group' of columns to rows tom Excel Discussion (Misc queries) 1 December 14th 06 06:19 AM
VLookup a Vlookup adamb2000 Excel Worksheet Functions 4 June 28th 06 10:54 PM
VLOOKUP Problem Ian Excel Discussion (Misc queries) 3 April 6th 06 06:47 PM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM


All times are GMT +1. The time now is 08:49 AM.

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"