Add two columns into one by formula and by VBA



Add two columns into one by formula and by VBA
Combine two cells data into one. Combine two cells into one using vba.

**Note this system will not allow me to enter square brackets so
not equal to symbol is the combination of greater than and less than symbols.

Sub insertcolumn()

Dim i As Integer

Worksheets(“Sheet1″).Select
‘ combine material number with p.o. number
‘ insert in new column
Columns(1).Insert
i = 2
Do While Cells(i, 2) (not equal to symbol)””
Cells(i, 1) = Cells(i, 2) & “-” & Cells(i, 4)
i = i + 1
Loop
Columns(“A:A”).EntireColumn.AutoFit

End Sub

For more help visit my website

I am able to provide online help on your computer for a reasonable rate.

MY videos are all created on Camtasia.

Follow me on Facebook

Watch more new videos about Excel Office | Synthesized by Mindovermetal English

Rate this post

Bài viết liên quan

Theo dõi
Thông báo của
guest
10 Comments
Cũ nhất
Mới nhất Được bỏ phiếu nhiều nhất
Phản hồi nội tuyến
Xem tất cả bình luận
Serplanter

Amazing. Your video is still helping people (like me) 4 years later!

Đinh Gia Huynh

How to merge multiple columns with concatnate function in vba. To 500.000 rows.

Sunny Pandey

she is so simple and cute

Ali Saadoon

Thanks a lot very useful, but I tried using it on my table it didn't work, can you help it says syntax error on " do while cells" line
Sub insertcolumn()

Dim i As Integer

Worksheets("Sheet1").Select
' combine Name with Address
' insert in new column
Columns(1).Insert
i = 2
Do While Cells(i, 2) (not equal to symbol)"" Cells(i, 1) = Cells(i, 2) & "-" & Cells(i, 4) i = i + 1
Loop Columns("A:A").EntireColumn.AutoFit

Rafael Quintero

Also a tutorial how to use VLookup VBA codes from one sheet to another on selected column?

Rafael Quintero

Would you please create a tutorial of VBA that could delete rows that are not desired?

Rafael Quintero

Thanks a lot it was useful for me

abbyh7

Thanks but you didnt explain in enough detail for me to understand how the code works, line by line.

mizouman

Thank you for the tips, fast and efficient

Nassim

That is what im searching .
Please help to edit this foluma as vba code ..
Means if anycell in D(i) contain text . Then C2= =D2&":"&NB.SI($D$2:D2:D2,D2)