+ Reply to Thread
Results 1 to 4 of 4

Coloured Cells

  1. #1
    Becks
    Guest

    Coloured Cells

    Is it possible to use a formula to return a value of True if a cell you refer
    to is coloured or not? What I want to do is: If Sheet1 A1 is shaded red,
    then I want a cell in Sheet2 to return P for paid, if not stay blank?

    Thanx

    Becks

  2. #2
    Gary''s Student
    Guest

    RE: Coloured Cells

    If you are willing to use a small UDF, then you can test for color. Enter
    this UDF:

    Function IsRed(r As Range) As Integer
    IsRed = 0
    If r.Interior.ColorIndex = 3 Then
    IsRed = 1
    End If
    End Function

    Then in A1 in Sheet2 enter:

    =IF(IsRed(Sheet1!A1)=1,"P","")
    --
    Gary's Student


    "Becks" wrote:

    > Is it possible to use a formula to return a value of True if a cell you refer
    > to is coloured or not? What I want to do is: If Sheet1 A1 is shaded red,
    > then I want a cell in Sheet2 to return P for paid, if not stay blank?
    >
    > Thanx
    >
    > Becks


  3. #3
    Becks
    Guest

    RE: Coloured Cells

    How do I enter the UDF? I've never used them before.

    Thanks

    "Gary''s Student" wrote:

    > If you are willing to use a small UDF, then you can test for color. Enter
    > this UDF:
    >
    > Function IsRed(r As Range) As Integer
    > IsRed = 0
    > If r.Interior.ColorIndex = 3 Then
    > IsRed = 1
    > End If
    > End Function
    >
    > Then in A1 in Sheet2 enter:
    >
    > =IF(IsRed(Sheet1!A1)=1,"P","")
    > --
    > Gary's Student
    >
    >
    > "Becks" wrote:
    >
    > > Is it possible to use a formula to return a value of True if a cell you refer
    > > to is coloured or not? What I want to do is: If Sheet1 A1 is shaded red,
    > > then I want a cell in Sheet2 to return P for paid, if not stay blank?
    > >
    > > Thanx
    > >
    > > Becks


  4. #4
    Becks
    Guest

    RE: Coloured Cells

    I have entered the UDF, and it works initially. But if the colour is cleared
    or added later the formula doesn't update?

    "Becks" wrote:

    > How do I enter the UDF? I've never used them before.
    >
    > Thanks
    >
    > "Gary''s Student" wrote:
    >
    > > If you are willing to use a small UDF, then you can test for color. Enter
    > > this UDF:
    > >
    > > Function IsRed(r As Range) As Integer
    > > IsRed = 0
    > > If r.Interior.ColorIndex = 3 Then
    > > IsRed = 1
    > > End If
    > > End Function
    > >
    > > Then in A1 in Sheet2 enter:
    > >
    > > =IF(IsRed(Sheet1!A1)=1,"P","")
    > > --
    > > Gary's Student
    > >
    > >
    > > "Becks" wrote:
    > >
    > > > Is it possible to use a formula to return a value of True if a cell you refer
    > > > to is coloured or not? What I want to do is: If Sheet1 A1 is shaded red,
    > > > then I want a cell in Sheet2 to return P for paid, if not stay blank?
    > > >
    > > > Thanx
    > > >
    > > > Becks


+ 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