Create and auto-populate comments

T1991

New Member
Joined
Oct 7, 2015
Messages
26
Office Version
  1. 2016
Good afternoon,

Is it possible to create and auto-populate comments in Excel?

If for example I have two sheets and sheet 2 is pulling values from sheet 1 that meet certain criteria, can I automatically create a comment for any values pulled over and then populate it with values from sheet 1 that are in different columns but on the same row?

So sheet 2 pulls the values from A1 and A3 in sheet 1.
Comment boxes are created for each one and is populated with values from:
For A1 - B1, C1, D1
For A3 - B3, C3, D3

Thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Book4
ABCD
1PetsDogCatParakeet
2
3SkySunMoonStars
Sheet1


VBA Code:
Sub DoSomething()
    Dim WS1 As Worksheet, WS2 As Worksheet
    Dim S As String

    Set WS1 = Worksheets("Sheet1")
    Set WS2 = Worksheets("Sheet2")

    With WS1.Range("A1")
        .Copy WS2.Range("A1")
        S = .Offset(0, 1).Value & vbCrLf & .Offset(0, 2).Value & vbCrLf & .Offset(0, 3).Value
    End With

    WS2.Range("A1").AddComment S

    With WS1.Range("A3")
        .Copy WS2.Range("A3")
        S = .Offset(0, 1).Value & vbCrLf & .Offset(0, 2).Value & vbCrLf & .Offset(0, 3).Value
    End With

    WS2.Range("A3").AddComment S
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,929
Members
449,195
Latest member
Stevenciu

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