+ Reply to Thread
Results 1 to 5 of 5

Thread: color codes

  1. #1
    Wazooli
    Guest

    color codes

    After seeing many posts regarding extracting the color value of a cell, I am
    wondering where one can get a listing of default colors with their respective
    codes.

  2. #2
    Ron de Bruin
    Guest

    Re: color codes

    Hi Wazooli

    Run this macro on a empty sheet


    Sub ListColors()
    Dim a As Long
    For a = 1 To 56
    Cells(a, 1).Interior.ColorIndex = a
    Cells(a, 2).Value = a
    Next a
    End Sub


    More info you can find here
    http://www.mvps.org/dmcritchie/excel/colors.htm



    --
    Regards Ron de Bruin
    http://www.rondebruin.nl



    "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    news:A3F2303B-1266-4CDF-B62C-14681FE98DD8@microsoft.com...
    > After seeing many posts regarding extracting the color value of a cell, I
    > am
    > wondering where one can get a listing of default colors with their
    > respective
    > codes.




  3. #3
    Wazooli
    Guest

    Re: color codes

    Well, i did it by brute force, which works suprisingly well, just
    inefficiently so. Anyway, after following another thread about extracting
    cell color using a function getcolor(), I was wondering if there was a way to
    assign cell color with a function. please be gentle - I have absolutely no
    VBA skills.

    "Ron de Bruin" wrote:

    > Hi Wazooli
    >
    > Run this macro on a empty sheet
    >
    >
    > Sub ListColors()
    > Dim a As Long
    > For a = 1 To 56
    > Cells(a, 1).Interior.ColorIndex = a
    > Cells(a, 2).Value = a
    > Next a
    > End Sub
    >
    >
    > More info you can find here
    > http://www.mvps.org/dmcritchie/excel/colors.htm
    >
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    >
    > "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    > news:A3F2303B-1266-4CDF-B62C-14681FE98DD8@microsoft.com...
    > > After seeing many posts regarding extracting the color value of a cell, I
    > > am
    > > wondering where one can get a listing of default colors with their
    > > respective
    > > codes.

    >
    >
    >


  4. #4
    Ron de Bruin
    Guest

    Re: color codes

    Hi Wazooli

    No, not with a function ( only with code )
    Or you can use CF, see Debra's site for examples
    http://www.contextures.com/xlCondFormat01.html

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl



    "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    news:C78AB560-316A-4430-A036-9D4FEFB1DFA7@microsoft.com...
    > Well, i did it by brute force, which works suprisingly well, just
    > inefficiently so. Anyway, after following another thread about extracting
    > cell color using a function getcolor(), I was wondering if there was a way
    > to
    > assign cell color with a function. please be gentle - I have absolutely
    > no
    > VBA skills.
    >
    > "Ron de Bruin" wrote:
    >
    >> Hi Wazooli
    >>
    >> Run this macro on a empty sheet
    >>
    >>
    >> Sub ListColors()
    >> Dim a As Long
    >> For a = 1 To 56
    >> Cells(a, 1).Interior.ColorIndex = a
    >> Cells(a, 2).Value = a
    >> Next a
    >> End Sub
    >>
    >>
    >> More info you can find here
    >> http://www.mvps.org/dmcritchie/excel/colors.htm
    >>
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >>
    >> "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    >> news:A3F2303B-1266-4CDF-B62C-14681FE98DD8@microsoft.com...
    >> > After seeing many posts regarding extracting the color value of a cell,
    >> > I
    >> > am
    >> > wondering where one can get a listing of default colors with their
    >> > respective
    >> > codes.

    >>
    >>
    >>




  5. #5
    David McRitchie
    Guest

    Re: color codes

    Hi Wazooli,
    Chip Pearson has several functions for dealing with Colors
    obtaining the value i.e. CellColorIndex
    http://www.cpearson.com/excel/colors.htm

    To change the color you have to use a SUB (subroutine).
    http://www.mvps.org/dmcritchie/excel/colors.htm

    But I think you have been working with code from your question
    and interaction, so you really should have started in the programming
    newsgroup instead of worksheet.functions, but same people
    there as here so stick with this group until you get your answers
    if not already solved.

    The color index colors are listed on my page above (2nd reference),
    but if the web is not handy for you some other time you will find
    a list of colorindex values in the VBE help (not the Excel help).
    I like my page better and it is easier for me to refer to.
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:%23X0eWeP9EHA.824@TK2MSFTNGP11.phx.gbl...
    > Hi Wazooli
    >
    > No, not with a function ( only with code )
    > Or you can use CF, see Debra's site for examples
    > http://www.contextures.com/xlCondFormat01.html
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    >
    > "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    > news:C78AB560-316A-4430-A036-9D4FEFB1DFA7@microsoft.com...
    > > Well, i did it by brute force, which works suprisingly well, just
    > > inefficiently so. Anyway, after following another thread about extracting
    > > cell color using a function getcolor(), I was wondering if there was a way
    > > to
    > > assign cell color with a function. please be gentle - I have absolutely
    > > no
    > > VBA skills.
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> Hi Wazooli
    > >>
    > >> Run this macro on a empty sheet
    > >>
    > >>
    > >> Sub ListColors()
    > >> Dim a As Long
    > >> For a = 1 To 56
    > >> Cells(a, 1).Interior.ColorIndex = a
    > >> Cells(a, 2).Value = a
    > >> Next a
    > >> End Sub
    > >>
    > >>
    > >> More info you can find here
    > >> http://www.mvps.org/dmcritchie/excel/colors.htm
    > >>
    > >>
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >>
    > >> "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    > >> news:A3F2303B-1266-4CDF-B62C-14681FE98DD8@microsoft.com...
    > >> > After seeing many posts regarding extracting the color value of a cell,
    > >> > I
    > >> > am
    > >> > wondering where one can get a listing of default colors with their
    > >> > respective
    > >> > codes.
    > >>
    > >>
    > >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0