Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
This question has probably been answered before. I'm trying to use a range as a table, so that I can refer to columns be their name for example: Set myrange = sheets("orders").Range("A10:N100") For Each row in my range myrange.ordertotal = myrange.subtotal + myrange.freight Next Wouldn't it be cool to say myrange.hasheader = true (first row of the range is the column name) Or even better myrange.columnnames = array("col1", "ColName"...) or myrange.columnNames = Range("A1:N1") This will give me a lot of flexibility - I can move the range to another location with little effect on the code. Also makes the code a little more self-documenting. Thanks in advance Habib -- www.DynExtra.com A resource for the Microsoft Dynamics Community Featuring FAQs, File Exchange and more Current member count: 40 -------------------------------------------- Share your knowledge. Add your favorite questions and answers Help add questions to this site! We want Your input. -------------------------------------------- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot table and value range | Excel Discussion (Misc queries) | |||
sorting data from one table/range to another table/range | Excel Discussion (Misc queries) | |||
Given a VALUE in a table, ascertain RANGE in another table | Excel Discussion (Misc queries) | |||
dynamic range with a table below the working table | Excel Worksheet Functions | |||
Mapping one table based on another table range | Excel Worksheet Functions |