Results 1 to 5 of 5

Coloring Cells Programatically

Threaded View

  1. #1
    Registered User
    Join Date
    06-04-2009
    Location
    Skopje, Macedonia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Coloring Cells Programatically

    Hi to all,

    In general I have 2 questions:

    1. I have the following function written VBA in excel:

    Function Ro3(r As Range) As Variant
        Dim RefString As String
        RefString = r.Address
        Ro3 = r.Worksheet.Evaluate("CHEM.MOLWEIGHT(" & RefString & ") < 300") And _
    	    r.Worksheet.Evaluate("CHEM.NUM.HBDONORS(" & RefString & ") <= 3") And _
    	    r.Worksheet.Evaluate("CHEM.NUM.HBACCEPTORS(" & RefString & ") <= 3") And _
              r.Worksheet.Evaluate("CHEMPROP.LOGP(" & RefString & ") <= 3")
    End Function
    that give TRUE/FALSE answer. Additionaly I want also the cell where is the answer to be colored, depending on the type of the answer (green for TRUE, red for FALSE). How is this possible?

    2. Is it possible to make a toolbar from function (e.g., this function)?

    Thanks in advance,
    Nikola
    Last edited by Paul; 02-02-2012 at 02:02 AM.

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