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 |
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 |
All times are GMT +1. The time now is 03:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com