Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default Code Modification

ComboBox5.RowSource = "OFFSET(" & Worksheets(8).Name & "!
Y4,,,COUNTA(" & Worksheets(8).Name & "!Y:Y))"

The above code populates Combobox5 with values from a
specific column starting with cell 4. Currently Combobox5
is being populated with data from Column Y starting in
Row4. However the column it pulls data from will not
always be Column Y, so I need for this code to be
dynamic. I will need Combobox5 to reference a cell(cell
W4) that contains the actual column to populate data
from. The starting cell will still be and always be 4.

For example lets say the value in cell W4 is AL. This
means the combobox needs to populate data from this Column.

How do I do this?

Thank you
Todd Huttenstine
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Code Modification

ComboBox5.RowSource = "OFFSET(" & Worksheets(8).Name & "!" _
& Range("W4").Value & ",,,COUNTA(" & Worksheets(8).Name & "!" _
& Range("W4").Value & ":" & Range("W4").Value & "))"

--
Regards,
Tom Ogilvy


"Todd Huttenstine" wrote in message
...
ComboBox5.RowSource = "OFFSET(" & Worksheets(8).Name & "!
Y4,,,COUNTA(" & Worksheets(8).Name & "!Y:Y))"

The above code populates Combobox5 with values from a
specific column starting with cell 4. Currently Combobox5
is being populated with data from Column Y starting in
Row4. However the column it pulls data from will not
always be Column Y, so I need for this code to be
dynamic. I will need Combobox5 to reference a cell(cell
W4) that contains the actual column to populate data
from. The starting cell will still be and always be 4.

For example lets say the value in cell W4 is AL. This
means the combobox needs to populate data from this Column.

How do I do this?

Thank you
Todd Huttenstine



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
modification to this code James Excel Discussion (Misc queries) 0 March 23rd 09 09:20 PM
Code modification help AndyMP Excel Worksheet Functions 1 February 8th 09 11:41 PM
Help in Modification of existing code JMay Excel Programming 11 February 28th 04 08:11 PM
Sort Code Modification Todd Huttenstine\(Remote\) Excel Programming 1 November 27th 03 08:18 AM
Modification to code Peter Atherton Excel Programming 1 September 23rd 03 07:36 PM


All times are GMT +1. The time now is 05:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"