Worksheetfunction does not have concatenate()

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I thought class WorksheetFunction has all excel functions inside but I just checked and noticed that Concatenate() function is not there.

Where to find it? Is there any object in vba which All excel functions?

Thank you for all your help.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
& will concatenate on both the worksheet and in VBA:


Excel 2010
ABCDE
1Hello3TwelveHello 3 TwelveHello 3 Twelve
Sheet3
Cell Formulas
RangeFormula
D1=A1&" "&B1&" "&C1


Code:
Sub concatenatex()
[e1] = [a1] & " " & [b1] & " " & [c1]
End Sub
 
Last edited:
Upvote 0
Wow, amazing idea and coding. wow. I just wanted to do it under loop for 10 cells but got error message. Is that possible to put it in a loop to do 10 cells at same time?
Thank you so much.

Sub concat()
Dim i As Integer
For i = 1 To 10
[c] = [a] & " " & [b]
Next i
End Sub
 
Last edited:
Upvote 0
Try:


Excel 2010
A
1q
2w
3e
4r
5t
6y
7u
8i
9o
10p
11
12q w e r t y u i o p
Sheet4


Code:
Sub concat()
Dim i As Integer, x As String
x = ""
For i = 1 To 10
x = x & " " & Cells(i, 1).Value
Next
Range("a12") = x
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,554
Messages
6,114,280
Members
448,562
Latest member
Flashbond

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top