Hello. Could anyone point me in the right direction to write a VBA statement based upon the number of characters in a cell. I'm trying to concatenate 5 columns but the second length of the 2nd column could vary, so I was trying to add a certain number of tabs to the column (depending on the size of the cell/text) to create equal spacing. I have already made this work as an Excel formula, but need it in VBA. I've started with
but it's failing on the first IF. Thanks
VBA Code:
c.Offset(,-1) &IF(LEN(c.Value)<10 THEN c.Value&Chr(9)&Chr(9)