IF "string of text" in cell A then copy cell B to another sheet

  • I am new to Excel formulas/VBA and am not sure if my problem can be solved with simple formulas, or if a VBA solution is better.

    I have csv files located in separate tabs, coming from various surveys taken over time. I want to compile all the comments from these surveys into a separate "Comments" tab. In the csv file, I need to search the column containing the questions (Column B), looking for those requesting comments. Once found, I want to copy the comments, which are located in column C, into the "Comments" tab. This tab will contain each of the questions along with the growing list of comments.


    Any advice in accomplishing this task, would be greatly appreciated.

  • Hello and Welcome to the Forum :)


    Quite difficult to guess what you are calling a "character string" ... ;)


    Attaching a sample file with a few records and your expected result would make every single potential contributor HAPPY :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

    Edited once, last by Carim ().

  • Lluisa

    Changed the title of the thread from “IF "character string" in cell A then copy cell B to another sheet” to “IF "string of text" in cell A then copy cell B to another sheet”.
  • Hello Carim,


    I have editied the title to clear up confusion. I run evaluation surveys and analyze the data. Currently, when creating our report, we use the "count if" function and include the question we are searching for in quotes. I would like to search for the specific questions soliciting comments and migrate the comments to a separate tab.


    I have attached a small sample of our data. You will see four tabs: 3 CSV files and a sample of the "Comments" tab to give an idea of what I am trying to do.

  • Hello Lluisa,


    Thanks for your clarification.


    However, it would seem that your small sample file ... is missing ;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Hello Lluisa,


    Thanks for your sample file.


    However, and sadly, I cannot visualize the process you want to implement .... :(

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!