Search code examples
pythonexcelexcel-formulaconcatenation

I want to concatenate multiple row sentence with condition according to another column of value


Sample

I am new to coding so I might not familiarize yet with coding.

I want to combine the sentence based on the value of column with number by cell. For example:

value = 3 Result = Maintenance painting, To be rectified, Maintenance painting

I am using VBA however i am not yet familiarize with it.

Explain to me as if i am not a programmer.


Solution

  • Why programming when you can do it with a simple formula, like this one:

    =CONCAT(E3:OFFSET(E3;VALUE(D3)-1;0))
    

    This solves the situation as shown in this screenshot:

    Excel Screenshot