+ Reply to Thread
Results 1 to 3 of 3

UDF to flag and color cell

  1. #1
    Registered User
    Join Date
    07-17-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    10

    UDF to flag and color cell

    Hi,

    I have below code to basically check if a selected range of cells are colored, and then Flag "Y" if they are. What I need to do next is to highlight the cell I flag with "Y" with yellow color (colorindex = 6), however I can't seem to make the highlight cell working. How do I do that?

    Please Login or Register  to view this content.
    Last edited by cchoo13; 11-09-2009 at 07:08 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: UDF to flag and color cell

    A UDF can only return a value
    (ie you can not use a UDF to format a cell).

    You would need to use Conditional Formatting to alter the fill colour of those cells containing Y.

  3. #3
    Registered User
    Join Date
    07-17-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: UDF to flag and color cell

    Quote Originally Posted by DonkeyOte View Post
    A UDF can only return a value
    (ie you can not use a UDF to format a cell).

    You would need to use Conditional Formatting to alter the fill colour of those cells containing Y.
    Then is there anyway for me to use macro to do this?
    Eg. Range from Column A - E is selected, if any cells from this range has colors, then Column F will be flagged with "Y" and highlighted in Yellow. Conditional Formatting is good however if macro can do this without the additional Conditional Formatting steps, then it would be good.

    Thanks.

+ 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.6.0 RC 1