Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Range
I have a sheet called result and It has Products and Machines field
Machines.I am trying to count the number of columns the machines have.Everytime I insert column my range changes.I have to insert column if the depending on some validation.Default is two columns.That works fine.When I insert another column it should give the count as 3 not 2. I don't know if I should use Dynamic range or not.If I have to please help me with the code. See attached document and the code comments,Thanks!!!! Attachment filename: help.xls Download attachment: http://www.excelforum.com/attachment.php?postid=633910 --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Range
Hi Patty,
Debra Dalgleish has a good intodutory tutorial on dynamic ranges at: http://www.contextures.com/xlNames01.html#Dynamic --- Regards, Norman "Patty2005 " wrote in message ... I have a sheet called result and It has Products and Machines field Machines.I am trying to count the number of columns the machines have.Everytime I insert column my range changes.I have to insert column if the depending on some validation.Default is two columns.That works fine.When I insert another column it should give the count as 3 not 2. I don't know if I should use Dynamic range or not.If I have to please help me with the code. See attached document and the code comments,Thanks!!!! Attachment filename: help.xls Download attachment: http://www.excelforum.com/attachment.php?postid=633910 --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Range
Hi,
Sub TEST() cnt = ActiveSheet.Range("D1").MergeArea.Columns.Count MsgBox "Number of columns are " & cnt End Sub (In your file, D1 is the first cell of columns the Machines have.) -- Regards, Soo Cheon Jheong _ _ ^ąŻ^ -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dynamic Range | New Users to Excel | |||
Dynamic range | Excel Discussion (Misc queries) | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel | |||
help with dynamic range | Charts and Charting in Excel | |||
Excel 2000 VBA - Set Print Range in dynamic range | Excel Programming |