Forum Discussion

Kalthof's avatar
Kalthof
Brass Contributor
Feb 26, 2020
Solved

Put CSV row data into 1 cell

Dear community,

 

Today I spent some time to figure out how I could put all the rows of my CSV file into 1 cell.

 

I have a list with hundreds of names. And I need all of them to be put in between quotes. Manually this would takes ages so I was trying to figure out a way to automate it.

 

Now I have figured out a way to divide the names with a comma.  But that is not what I am trying to do. I want to automate it the same way I did manually in the enclosed image.

 

Thank you for your help in advance. I appreciate it!

 

Kind regards,

Jeroen

6 Replies

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor
    If you have the latest version of Office 365 you can use this:
    ="name = '"&TEXTJOIN("' or name = '",TRUE,A1:A4)&"'"
    • Kalthof's avatar
      Kalthof
      Brass Contributor

      JKPieterse thank you for your reply.

       

      I have this version: Microsoft Office 2019 Home & Student.

       

      Now I am not sure if I don't get it to work because I can't use the formula because of my version. Or because I am doing something wrong.

       

      In the enclosed image I showed what I did. Hopefully you can tell me what I did wrong.

       

      Now I want to emphasize one thing. It is important that the string in C1 is used. Because I have to input this string in another programm. So the result of the formula has to be exactly this in the end: name= 'Tim' OR name = 'Jack' OR name = 'Anne' OR name = 'Ali' OR name = 'Emma'  

       

      I appreciate your help. Thank you.

       

      Kind regards,

      Jeroen

Resources