Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Copying Comments when Filtering.
by Allen Wyatt
(last updated January 29, 2020)
Vinod frequently uses Excel's advanced filtering tools to copy filtered data from one location to another. In some instances he would like to copy not only the cell contents but also the cell comments of the cells that meet the filtering criteria. He's not looking for a way to filter based on comments, but only to copy comments along with the cell contents when using the advanced filtering capabilities of Excel.
(It should be noted that Microsoft changed the way comments work in Excel Office 365. Comments are now threaded allowing users to have discussions with each other regarding the data. Notes work like comments in earlier versions of Excel.)
As far as we can tell, there is no way to copy comments or notes using advanced filtering; only the cell contents are copied. However, it is possible to easily copy the comments or notes using a two-step process.
First, filter your data, but make sure you do the filtering in-place; don't specify that you want the information copied to a different location. You end up with a filtered list, showing only the cells that meet your criteria. Next, select the cells returned by the filtering. You should then make sure that Excel knows you only want the visible cells selected:
Figure 1. The Go To Special dialog box.
With the visible cells selected (those hidden by the filtering are not selected), you are ready for the second step: Copy the cells to another location using normal editing techniques. The result is that the comments or notes are copied right along with the cell contents.
If you perform this task quite a bit and it even bugs you to do the two steps, you could automate the task. The following macro will apply a filter in-place, copy the visible cells to the Clipboard, and then paste them (and their comments or notes) into a new workbook:
Sub AdvancedFilter_AndCopyComments() With Range("Database") ' filter the data range .AdvancedFilter Action:=xlFilterInPlace, _ CriteriaRange:=Range("Criteria"), Unique:=False ' copy visible cells only .SpecialCells(xlCellTypeVisible).Copy End With ' goto to another worksheet Sheets("Sheet1").Select ' and paste the copied data With Range("A1") .PasteSpecial xlPasteColumnWidths .PasteSpecial xlPasteAll End With Application.CutCopyMode = False End Sub
The macro assumes you have two named ranges set up: one for the data to be filtered (Database) and the other for the filtering criteria (Criteria). Run the macro, and the filtered, commented or noted information ends up on Sheet1.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10284) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Copying Comments when Filtering.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
If you have a large number of data records, each with an associated date, you might want to filter that data so you see ...Discover More
The filtering capabilities of Excel are quite helpful in taming a large amount of data. While you can filter by color, ...Discover More
Filtering is a great asset when you need to get a handle on a subset of your data. Excel even makes it easy to copy the ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.