rubinda

New Member
Joined
Jun 26, 2018
Messages
36
I have never written a concatenate code in VBA before and I am not finding anything.

I am trying to convert the following formula to VBA: =CONCATENATE("MD",MID(A4,4,1),RIGHT(A4,5),G4)

Can you please help?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Give this a try...
Code:
[table="width: 500"]
[tr]
	[td]ConcatValue = "MD" & Mid(Range("A4").Value, 4, 1) & Right(Range("A4").Value, 5) & Range("G4").Value[/td]
[/tr]
[/table]
 
Upvote 0
I am trying to find code that will look for text in column B. If there is data in column B, I would like code to use concatenate to fill that in in column C. I do not want to use a formula, just code.
Does that make sense?
 
Upvote 0
I am trying to find code that will look for text in column B. If there is data in column B, I would like code to use concatenate to fill that in in column C. I do not want to use a formula, just code.
Some follow up questions...

1) Is your data contiguous in Column B or could there be blank cells scattered about between the data cells?

2) Did you want every data cell concatenated together and placed into a single cell? If so, which cell? If not, please explain exactly what you do want.

3) What row does your data start on?
 
Upvote 0

Forum statistics

Threads
1,215,522
Messages
6,125,312
Members
449,218
Latest member
Excel Master

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