Copy cells based on conditions [Solved/Closed]

Report
Posts
3
Registration date
Monday October 5, 2015
Status
Member
Last seen
January 26, 2016
-
Posts
3
Registration date
Monday October 5, 2015
Status
Member
Last seen
January 26, 2016
-
Hello,

I want to make several versions of a questionnaire specific for each out of 11 types of a product. Therefore I made a button for each of the product categories on Sheet1 and all possible questions in a column of another sheet (Sheet2; range A2-A211). Here the first row would be the names of the mentioned categories (B1-L1) and under each category would be either "1", "2" or nothing. What I want to do is, that when one of the category is chosen (one clicks on one of the buttons on Sheet1), it copy-pastes the questions (Sheet2; A2-A211) based on the code under the particular category. For example I click on the button no.3 on Sheet1 and the macro will copy-paste the only questions from Sheet2, where there is "1" or "2" in the particular column (in this case D2-D211) with the difference that it is going to mark the ones where there is "2" by red colour as required (or something like that). Where there is no number in that particular column, the question is not going to be copy-pasted. They should also obviously come under each other without gaps. I am a total rookie in this, but it does not sound like a difficult thing. Can anyone help me, please? Thanks a lot!

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
You can get started by using macro recorder

Basic idea would be to on click of the button, you filter the other sheet for the appropriate values. copy all the filtered data and paste on your new sheet
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Posts
3
Registration date
Monday October 5, 2015
Status
Member
Last seen
January 26, 2016

Thanks a lot! I've been playing with it now for a little while and it's very useful. Though I may still come back with some questions.

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!