Convert column into notes and apply to other columns

%3CLINGO-SUB%20id%3D%22lingo-sub-3008030%22%20slang%3D%22en-US%22%3EConvert%20column%20into%20notes%20and%20apply%20to%20other%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3008030%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20curiosity.%20Can%20I%20convert%20some%20column%20into%20notes%20and%20apply%20those%20notes%20to%20other%20column%3F%3C%2FP%3E%3CP%3EFor%20example%2C%20how%20do%20I%20convert%20the%20last%20three%20column%20into%20notes%20and%20apply%20them%20to%20the%20Injury%20Location%20(Just%20a%20sample%2C%20not%20related%20to%20the%20actual%20information%20in%20the%20excel).%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Daniela33_1-1637919561886.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F329663i654C3671A860F69C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Daniela33_1-1637919561886.png%22%20alt%3D%22Daniela33_1-1637919561886.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3008030%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3008327%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20column%20into%20notes%20and%20apply%20to%20other%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3008327%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1230255%22%20target%3D%22_blank%22%3E%40Daniela33%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20could%20run%20a%20macro%20like%20this%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-visual-basic%22%3E%3CCODE%3ESub%20CreateComments()%0A%20%20%20%20Dim%20r%20As%20Long%0A%20%20%20%20Dim%20m%20As%20Long%0A%20%20%20%20m%20%3D%20Range(%22L%3AN%22).Find(What%3A%3D%22*%22%2C%20SearchOrder%3A%3DxlByRows%2C%20SearchDirection%3A%3DxlPrevious).Row%0A%20%20%20%20For%20r%20%3D%202%20To%20m%0A%20%20%20%20%20%20%20%20Range(%22B%22%20%26amp%3B%20r).AddComment%20Text%3A%3DRange(%22L%22%20%26amp%3B%20r).Value%20%26amp%3B%20%22%20%22%20%26amp%3B%20_%0A%20%20%20%20%20%20%20%20%20%20%20%20Range(%22M%22%20%26amp%3B%20r).Value%20%26amp%3B%20%22%20%22%20%26amp%3B%20Range(%22N%22%20%26amp%3B%20r).Value%0A%20%20%20%20Next%20r%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hello, 

 

I have a curiosity. Can I convert some column into notes and apply those notes to other column?

For example, how do I convert the last three column into notes and apply them to the Injury Location (Just a sample, not related to the actual information in the excel).

Daniela33_1-1637919561886.png

 

Thank you!

 

1 Reply

@Daniela33 

You could run a macro like this:

Sub CreateComments()
    Dim r As Long
    Dim m As Long
    m = Range("L:N").Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    For r = 2 To m
        Range("B" & r).AddComment Text:=Range("L" & r).Value & " " & _
            Range("M" & r).Value & " " & Range("N" & r).Value
    Next r
End Sub