To concatenate all values in range A2:A100, place the following formula into B2 and drag/fill it down to B100.
=CONCATENATE(B1,",",A2)
If you want to concatenate all values in a range on the condition that there's a 1 in column B:
=IF(B2=1,CONCATENATE(C1,",",A2),C1)
To avoid the , or 0 at the beginning, in the first cell that should have a value, enter the value manually and copy the formula to the cell below it.
Thank you for posting this - it's exactly what I was searching for.
ReplyDeleteThanks - much easier than dealing with VBA. Works perfectly :)
ReplyDeleteThe beauty of simplicity - THANKS!
ReplyDelete