Pasting a portion of an array
Hello
i would like to paste an array to my spreadsheet but i only want to paste the right most column to the sheet. i simply cannot rememeber how to resize it. I think i have the left side of the equation correct but.... wbk.Application.Range("drop_here").Resize(UBound(v Template, 1), 1).Value = vTemp Thank you in advance. W |
Pasting a portion of an array
ww wrote:
Hello i would like to paste an array to my spreadsheet but i only want to paste the right most column to the sheet. i simply cannot rememeber how to resize it. I think i have the left side of the equation correct but.... wbk.Application.Range("drop_here").Resize(UBound(v Template, 1), 1).Value = vTemp Thank you in advance. W If vTemp has fewer elements than 5461 or you're working in a version of Excel later than xl2000, change vTemp to Application.Index(vTemp,0,1). Alan Beban |
Pasting a portion of an array
Alan Beban wrote:
ww wrote: Hello i would like to paste an array to my spreadsheet but i only want to paste the right most column to the sheet. i simply cannot rememeber how to resize it. I think i have the left side of the equation correct but.... wbk.Application.Range("drop_here").Resize(UBound(v Template, 1), 1).Value = vTemp Thank you in advance. W If vTemp has fewer elements than 5461 or you're working in a version of Excel later than xl2000, change vTemp to Application.Index(vTemp,0,1). Alan Beban Whoops! I gave you code for the leftmost column. For the rightmost substitute Application.Index(vTemp, 0, UBound(vTemp, 2) - LBound(vTemp, 2) + 1) Sorry, Alan Beban |
All times are GMT +1. The time now is 08:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com