Results 1 to 2 of 2

Thread: Appending the Cells Interior.Color reference to the cell value

  1. #1
    Acolyte jilbobagins's Avatar
    Join Date
    Apr 2019
    Excel Version

    Appending the Cells Interior.Color reference to the cell value

    Register for a FREE account, and/
    or Log in to avoid these ads!


    I basically want to pull a worksheet into power query, however its something another team use every day and color it in based on the status for that cell.

    So I need to understand whilst i'm wrangling data what the source workbook/tables cell color was. Im hoping a clever VBA type might assist!

    So an example would be Cell A1 is filled Red and has the text "Hello", what i'd like to see after a macro is run is within Cell A1 " Hello | 255" ( just added | as a suitable delimiter). The worksheet itself is some 200 rows by 80 columns currently but that's growing all the time.

    ANy help would be appreciated

  2. #2
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Excel Version
    run after you've selected the cells you want to process:
    Sub blah()
    For Each cll In Selection.Cells
      cll.Value = cll.Value & "|" & cll.Interior.Color
    Next cll
    End Sub
    If you want to take into account possible conditional format colours then change cll.Interior.Color to cll.DisplayFormat.Interior.Color

Posting Permissions

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