Consulting

Results 1 to 5 of 5

Thread: Need to consolidate comments across spreadsheets

  1. #1
    VBAX Newbie
    Joined
    Apr 2017
    Posts
    3
    Location

    Lightbulb Need to consolidate comments across spreadsheets

    I have a workbook that includes 1 summary sheet and a number of data sheets.
    Each of those sheets have same page layout so for instance cell A1 in summary tab equals the sum of all cell A1s from data sheets.

    The cells in datasheets includes comments that describe the data in the cell so I'm wondering if there's anyway I can consolidate all those comments to the summary sheet?

    Thank you!

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    This may give you a starting point. https://www.extendoffice.com/documen...-workbook.html.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,645
    Sub M_snb()
       for each it in sheets
          if it.name<>"summary" then 
            for each it1 in it.cells.specialcells(-4144)
              sheets("summary").cells(it.row,it.column).comment.text sheets("summary").cells(it.row,it.column).comment.text & vblf & it.comment.text
            next
         end if
       next
    End Sub

  4. #4
    VBAX Newbie
    Joined
    Apr 2017
    Posts
    3
    Location

    Run-time error '1004': No cells were found

    Thank you for your help!

  5. #5
    VBAX Newbie
    Joined
    Apr 2017
    Posts
    3
    Location
    Thank you for your code.

    I tried your code and the error message "Run-time error '1004': No cells were found" popped.

    I changed For Each it1 In it.cells.specialcells(-4144) to For Each it1 In it.Cells.SpecialCells(xlCellTypeComments) but it still won't work.

    Do you know why this would happen or how to fix it?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •