Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
TRANSPOSE 'group' of columns to rows | Excel Discussion (Misc queries) | |||
VLookup a Vlookup | Excel Worksheet Functions | |||
VLOOKUP Problem | Excel Discussion (Misc queries) | |||
VLOOKUP Limitations | Excel Worksheet Functions | |||
vlookup data hidden within worksheet | Excel Worksheet Functions |