![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 90
|
I am constructing a new WrkSheet based on columns from a Detail WrkSheet.
I would like to use a reference name (Name1) field as opposed to qualified coding (A:A). In other words, use a named reference (see Ctl F3 when workbook open), and then copy this reference from detail to new work sheet. This piece of code is close to what I am trying to do, but fails: 'Selectand Copythe Reference Field. Sheets("DetailSheet").Select Columns(Name1).Select Selection.Copy ' Paste the selction to New Sheet. Sheets(NewSheet).Select Columns("B:B").Select ActiveSheet.Paste Any Help is greatly appreciated...
__________________
EMSS |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Try the following code:
Sheets("NewSheet").Range("B:B").Value = Sheets("DetailSheet").Range("Name1").Value
__________________
Kind regards, Al Chara |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|