Hi all,
I am currently trying to concatenate certain cells based on the value of a particular cell (I.e. if A2 = X, concatenate B2, C2, and D2 , but if A2 = Y, concatenate B2, C2, and E2), separated by commas.
I have managed to do this with an IF function below
=IF(A2="X",B2&"in, "&C2&", "&D2,IF(A2="Y",B2&"in, "&C2&", "&E2))
I know in the future I am going to have more values than just x and y, and I will have to concatenate more columns of info based on them, so I didn't want an IF function that was 3 miles long in case someone has to go back and edit they don't have to search through a formula in a cell.
Is there a way to achieve the same thing in VBA?
(Also, column B in the table specifies a length in inches which is important in the description (the result of concatenating the cells), is there a way to specify units for one column but not others?)
Thanks,
cicicle
Bookmarks