VBA & Macro Problems

Convert Excel Column Values into Cell Notes with VBA

Bushra ParveenBushra Parveen Dec 2, 2026 868 views

Question details

Combine values from several columns and add the resulting text as notes to cells in another column.

Convert Excel Column Values into Cell Notes with VBA
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to combine values from columns L through N for each row and place the text in the corresponding cell in column B.
Observed behavior
Each destination cell should contain a note with the combined values from its row.
Before you start

Open the workbook in desktop Excel and check that columns L through N contain the source values and column B is the intended destination. Remove or resolve any threaded comments in the destination range, and correct source cells containing Excel errors before running the macro.

Solution 1Recommended

Use a VBA macro to add combined column values as notes

Use this method to create a note in column B for each data row using values from columns L, M, and N.

In current Excel versions, VBA's AddComment method creates a legacy note, not a threaded comment. The macro starts at row 2 and skips cells that already have a note.

1
Open the VBA editor

In desktop Excel, select the worksheet to update, then open Developer > Visual Basic. If the Developer tab is hidden, enable it in Excel's ribbon settings.

2
Insert the macro

In the Visual Basic editor, select Insert > Module and paste this code: Sub CreateNotesFromColumns() Dim ws As Worksheet Dim lastCell As Range Dim r As Long Dim noteText As String Set ws = ActiveSheet Set lastCell = ws.Range("L:N").Find(What:="*", After:=ws.Range("L1"), _ LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlPrevious, MatchCase:=False) If lastCell Is Nothing Then Exit Sub For r = 2 To lastCell.Row noteText = Trim(CStr(ws.Range("L" & r).Value) & " " & _ CStr(ws.Range("M" & r).Value) & " " & _ CStr(ws.Range("N" & r).Value)) If Len(noteText) > 0 Then If ws.Range("B" & r).Comment Is Nothing Then ws.Range("B" & r).AddComment Text:=noteText End If End If Next r End Sub

3
Run the macro

Return to the intended worksheet, select Developer > Macros, choose CreateNotesFromColumns, and select Run. Enable macros only if you trust the workbook and its code.

4
Check and save

Select cells in column B and inspect their notes. To retain the macro, choose File > Save As and save the workbook as an Excel Macro-Enabled Workbook (.xlsm).

Use a VBA macro to add combined column values as notes
Customize the columns: Change L, M, and N in the source references and B in the destination references to match your sheet. The macro does not overwrite existing notes; resolve existing threaded comments separately before running it.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with spreadsheets. Open compatible Excel files to make migration easier; VBA macro availability and compatibility can vary by WPS version and platform.

Review and edit worksheet data in WPS Spreadsheets.Open and work with Microsoft Excel formats, including XLSX.Use a familiar spreadsheet interface for everyday tasks.Move between compatible Office documents in one lightweight suite.
QA img-9

Frequently Asked Questions

Does AddComment create a threaded comment or a note?

In current Excel versions, the VBA AddComment method creates a legacy note. Threaded comments are a separate feature.

What happens if a destination cell already has a note?

The sample macro skips that cell, leaving its existing note unchanged. Review notes in column B before running the macro if you need different behavior.

How do I use different source or destination columns?

In the VBA module, replace the L, M, and N source references with your chosen columns, and replace B with your destination column. Also update the L:N range and L1 reference used to find the last source row.

Why should I save the workbook as an XLSM file?

Choose File > Save As and select Excel Macro-Enabled Workbook (.xlsm) to retain the VBA macro. An XLSX workbook cannot store VBA code.