VB Concatenate logic

UHsoccer

Well-known Member
Joined
Apr 3, 2002
Messages
1,023
Need to concatenate cells from column B and C

Trying to use this code, w/o success

Dim Cntr
For Cntr = 1 To ActiveSheet.UsedRange.Columns(1).Rows.Count
Cells(Cntr, 2) = Cells(Cntr, 2) & " " & Cells(Cntr, 3)
Next
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi
It's working for me?

You are running it as a procedure?
Sub?<pre>
Sub CellPlusCell()
Dim Cntr
For Cntr = 1 To ActiveSheet.UsedRange.Columns(1).Rows.Count
Cells(Cntr, 2) = Cells(Cntr, 2) & " " & Cells(Cntr, 3)
Next
End Sub</pre>

Tom

_________________
Found a solution? If so, please post again so members of this board can spend their time helping others. Better still, edit your topic(intitial post), by tagging on a word or phrase such as, "Problem Solved", or "Resolved". Thanks for being courteous!
This message was edited by TsTom on 2002-05-07 08:19
 
Upvote 0
I am running it as a Macro

1) It INSERTs a column
2) The concatenate does not show any results
 
Upvote 0
Solved problem, I am also adding and deleting columns and the referenced was incorrect

Thanks for the help
 
Upvote 0

Forum statistics

Threads
1,214,566
Messages
6,120,262
Members
448,953
Latest member
Dutchie_1

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