» Combine column text and replace using VBA in Microsoft Excel
CATEGORY - Cells, Ranges, Rows, and Columns in VBA
VERSION - All Microsoft Excel Versions
Text from column C:D is to be combined and column D to be reset
Answer:
Insert the following code in the standard module.
Sub Edit()
Dim intRow As Integer, intRowL As Integer
Application.ScreenUpdating = False
intRowL = Cells(Rows.Count, 3).End(xlUp).Row
For intRow = 2 To intRowL
Cells(intRow, 3) = Cells(intRow, 3) & " - " & Cells(intRow, 4)
Next intRow
Range(Cells(2, 4), Cells(intRowL, 4)).Value = "489-610"
Columns.AutoFit
Application.ScreenUpdating = True
End Sub
Book Store:
Recommended Books:
- Rich Dad, Poor Dad: What the Rich Teach Their Kids About Money--That the Poor and Middle Class Do Not!
- Real Estate Finance and Investments (Real Estate Finance and Investments, 11th Ed)
- Understanding Financial Statements
- Special Edition Using Microsoft Excel 2002
- The 22 Immutable Laws of Marketing : Exposed and Explained by the World's Two
- Essentials of Accounting and Post Test Booklet 8, Eighth Edition
No comments have been submitted.

