I am kind of new to VBA and with the help of Google I could not get this issue solved. The filtering with AutoFilter is no problem, but finding the correct header to filter based on the variable I could not get to work.
In my Excel file I have 2 sheets: Client and Overview.
Within the Client sheet I have all my clients as headers and destinations as rows. Below the clients I have indicated with an X if this destination is applicable to that client.
In my Overview sheet cell B1 I will fill in my client name, this value will be variable based on the users input.
I then want to filter the Client sheet based on my value in B1 and then filter on X.
In this way the page will be filtered on the destinations that have a X for that specific client. Then I want to copy the values in column A to B5 and below in the Overview sheet.
I have added 2 screenshots below as example:
Input page Client, in the 1st row I have to search my client name and then filter on X to get the correct destinations for this client:
Output Page Overview, Based on value in cell B1 I then need to copy the destinations from column A to B5 and below.
In my Excel file I have 2 sheets: Client and Overview.
Within the Client sheet I have all my clients as headers and destinations as rows. Below the clients I have indicated with an X if this destination is applicable to that client.
In my Overview sheet cell B1 I will fill in my client name, this value will be variable based on the users input.
I then want to filter the Client sheet based on my value in B1 and then filter on X.
In this way the page will be filtered on the destinations that have a X for that specific client. Then I want to copy the values in column A to B5 and below in the Overview sheet.
I have added 2 screenshots below as example:
Input page Client, in the 1st row I have to search my client name and then filter on X to get the correct destinations for this client:
Output Page Overview, Based on value in cell B1 I then need to copy the destinations from column A to B5 and below.