Hello All,
I am having a problem I hope someone can help me with. I currently have three columns, from which I take their contents and combine into a single column (#2). I then used a VBA code to Concatenate each cell in the new column (#2) and have the output come together in one cell (#3).
The module i've created is necessary as it skips any blank values. This worked perfectly, however, when I closed and reopened the excel file, I get a #NAME ? error in the cell (#3). Do you know why this NAME error occurs every time I close and open the file? How can I fix this? I have tried deleting and putting the module again, but it doesn't work. Is there something wrong I am doing?
The formula I use to combine the comments into one column (#2) is this:
=IF(AO23="","","WK"&"."&AC23&"."&" "&AN23&" - "&AO23)
The formula I use in to obtain output in the cell (#3) is this:
=concatenatecells(CH23:CH222)
The module code is below:
I am having a problem I hope someone can help me with. I currently have three columns, from which I take their contents and combine into a single column (#2). I then used a VBA code to Concatenate each cell in the new column (#2) and have the output come together in one cell (#3).
The module i've created is necessary as it skips any blank values. This worked perfectly, however, when I closed and reopened the excel file, I get a #NAME ? error in the cell (#3). Do you know why this NAME error occurs every time I close and open the file? How can I fix this? I have tried deleting and putting the module again, but it doesn't work. Is there something wrong I am doing?
The formula I use to combine the comments into one column (#2) is this:
=IF(AO23="","","WK"&"."&AC23&"."&" "&AN23&" - "&AO23)
The formula I use in to obtain output in the cell (#3) is this:
=concatenatecells(CH23:CH222)
The module code is below:
Code:
Function Concatenatecells(ConcatArea As Range) As String'updateby Extendoffice 20151103
For Each n In ConcatArea: nn = IIf(n = "", nn & "", nn & n & Chr(10)): Next
Concatenatecells = Left(nn, Len(nn) - 1)
End Function