Hi guys,
I'm new to VBA and have been learning and playing around with various arguments over the past few bays but I still cant get it to do what I want to.
basically I have 3 worksheets -
"Company String Elements" with a 'bank' of string values in column A with altered strings in column B
"Variables page" with a column of drop down selections for all the 'banked' string values from column A on "Company String Elements" sheet
"Output" where I want to produce a list of the altered values (from "Company String Elements" column B) when the banked values on "company string elements" match any of the values selected from the drop down menus on "variables page".
for example - lets say Macdonalds is in A3 of the Company string elements worksheet and if I Select Macdonalds from the "variables page" worksheet drop down and click the button on "output page" I want to see the Altered string value from B3 plus any other matching values from the drop downs.
So far I've managed to get a list of 'altered' strings by using a loop:
Dim i As Integer
i = 3
Do While Worksheets("Variables page").Cells(i, 1).Value <> ""
Worksheets("Output Page").Cells(i, 1).Value = Worksheets("Company String Elements").Cells(i, 2).Value
i = i + 1
Loop
End Sub
But this would only work if the drop downs are selected in the same order as they are in-putted on the company string elements worksheet.
so then I had a thought to use just one list with tick boxes and have some kind of IF rule loop but thought this would probably open a huge can of worms.
in an ideal world all of the matching strings would be concatenated but a list that I can then concatenate would be fine.
I hope this makes sense....?
any help would be really appreciated!
Thanks again,
Thom.
Bookmarks