Hello everyone
I have found this sub for concatenating non-adjacent columns but can't use it
How to concatenate non-adjacent cells in the same row but different columns?Please Login or Register to view this content.
Thanks advanced
Hello everyone
I have found this sub for concatenating non-adjacent columns but can't use it
How to concatenate non-adjacent cells in the same row but different columns?Please Login or Register to view this content.
Thanks advanced
< ----- Please click the little star * next to add reputation if my post helps you
Visit Forum : From Here
What exactly are you looking to achieve with this code? are you able to attach a 'before & after' workbook?
I need to concatenate B1:E1 and G1:H1 and K1 and L1:N1 (in one row which is here for example row1)
I'm not sure I follow your requirement. It sounds very basic.
One can do that with a formula.Formula:Please Login or Register to view this content.
For VBA, say you want to store this concatenated string in Column P for each row then:
Please Login or Register to view this content.
It gets a value error ..
Concatenate only handles single cells, not ranges, so you would need a custom function for that.
Yes I know Mr. Stephen and I found the UDF in the first post but don't know how to use it ..
Generall I found another one
Please Login or Register to view this content.
You need to specify a delimiter too
=CONCAT(",",B1:E1,G1:H1,K1:N1)
Thanks Mr.Stephen
In fact my problem was not with the last UDF function in post #7 ..
My problem was with the UDF function in Post # 1 and how to use it ...I still need to know how to use it (From Post #1)
Thanks a lot for reply
You have to call it from another macro, e.g.
Works for me.Please Login or Register to view this content.
Oops, my bad!
Didn't know that CONCATENATE works only with individual cell references, and not ranges. As you have only a few cells to concatenate, try this:
Formula would be:Please Login or Register to view this content.
Formula:Please Login or Register to view this content.
Last edited by jewelsharma; 01-26-2016 at 10:07 AM. Reason: VBA code editted
This was just a sample and the original file more ranges will be concatenated .. and some are negative I mean may be A1:C1 and I1:K1 and then D1:E1 ...
Thanks fro help I think I will use the UDF in post #7
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks