We've got some VB code in an Excel Workbook at present which allows data validation (list dropdown) options to be multiple selected and then for each dropdown item selected from the list, it outputs the option at the end of the row, one option per column.

I.e: Selecting Apples, Bananas and Cherries from the drop down list would output Apples | Bananas | Cherries (where | is column separator) at the end of the row where the first cells are empty.

The code we have for this is:-

Please Login or Register  to view this content.
What we would like to modify in this VB code however, is instead of filling cells at the end of the row with the data validations selected. We would like to fill the cell under the column where column heading matches the option selected from dropdown.

I.e: Apples selected in dropdown would fill the cell on that row under the column labelled 'Apples'. Cherries selected in dropdown would fill the cell on that row under the column labelled 'Cherries'. Ideally, by fill, we would colour that cell or put an X there rather than repeat the name of the item selected.

If anyone could advise on what we would need to modify in the above code, it would be greatly appreciated.