I was seeking an answer for my problem. @Quadruple_Pawn gave me this useful solution below which is works very well. Attached image 'solution'. This code's purpose is to print if there is a 'True' in A column, it should print the corresponding part in D column in order to column C. The problem is old file was an example file and now I got the original data DataLO.xlsx and I couldn't succeed to convert this code to make it work with this original file. Because at some point the rows format is changing in file(see attached other image) and I don't know how to convert this code to complete this task. Also in original data we have additionally id in column A, true-false values are separated with rows and I need to add new column to print opt-in as the previous file(attached file LO data testing(1).xlsm).