+ Reply to Thread
Results 1 to 7 of 7

Formatting a Cell within a function

  1. #1
    Registered User
    Join Date
    11-05-2007
    Posts
    82

    Formatting a Cell within a function

    All,

    I'm having some difficulties with formatting of a cell.

    I am trying to color the cell, and change the font based on some simple if statements within the function.

    Here's some of the code (Simplified) that I am trying to get to work:

    Please Login or Register  to view this content.

    I think I may have the syntax wrong but cant have tried many other ways.

    Any help would be greatly appreciated.

    Thanks
    Last edited by arthurbr; 11-25-2008 at 06:21 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    A Function should not be used to change a cell.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    11-05-2007
    Posts
    82
    I see - so I'm assuming the best way to do this would be to create a macro that would run after an event has taken place?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Have you considered Conditional Formatting?

  5. #5
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Hi

    You cant change the format of a cell using Function.

    Even if a function is calling a macros to format the cell... it does not work...

  6. #6
    Registered User
    Join Date
    11-05-2007
    Posts
    82
    I have considered and tried conditional formating - however the formats I want to create are to complex, to my knowledge, to be done within that function.

    Basically - I have 2 sets of data, one is an overall performance and the other is an internal performance - both based on the same targets. The overall performance is the figure that is shown in the results, and changes font color based on the RAG targets (We have an addtional Red Major target too - so there are 4 possible colors.) The Internal performance is then used to RAG rate the Internal performance and is used to color the backround of the same results cell. There is a possible 10 different combinations of cell and font colours that I need to build in.

    I dont think this can be done on the Conditional formating?
    Any ideas?

  7. #7
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Check this topic..

    may be helpful for you

    http://www.ozgrid.com/forum/showthread.php?t=49193
    Last edited by Shijesh Kumar; 11-25-2008 at 09:00 AM.

+ 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