+ Reply to Thread
Results 1 to 7 of 7

Cell-Color searching function

Hybrid View

  1. #1
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Cell-Color searching function

    jrodri14
    maybe..in a kinda roundabout fashion
    Function FindColour(FindRange As Variant) As String
      For e = 1 To FindRange.Cells.Count
       If FindRange.Cells(e, 1).Characters(Start:=1, Length:=1).Font.ColorIndex = 3 Then
       FindColour = FindRange.Cells(e, 1).Address
       End If
       Next
    End Function
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  2. #2
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Cell-Color searching function

    Quote Originally Posted by pike View Post
    jrodri14
    maybe..in a kinda roundabout fashion
    Function FindColour(FindRange As Variant) As String
      For e = 1 To FindRange.Cells.Count
       If FindRange.Cells(e, 1).Characters(Start:=1, Length:=1).Font.ColorIndex = 3 Then
       FindColour = FindRange.Cells(e, 1).Address
       End If
       Next
    End Function
    I think he wants cell color, not font color.
    If so change to
    If FindRange.Cells(e, 1).Interior.ColorIndex = 3 Then
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

+ 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