+ Reply to Thread
Results 1 to 2 of 2

Thread: Put an if statement according to cell format

  1. #1
    Melkett
    Guest

    Put an if statement according to cell format

    I have a spreadsheet with approx. 10000 rows. And i would like to select and
    copy the yellow rows and paste them to another sheet. Or delete cells which
    are not yellow.

    I think that i can do it by putting an if statement in each row and filter
    them.
    For example, excel will type 1 if the is yellow, else 0. Then it will be
    easy to select and copy them. But how?

    Or do you have any idea other than "if statement"
    I need yor help. Thanks.



  2. #2
    Gary's Student
    Guest

    RE: Put an if statement according to cell format

    If you are comfortable with VBA this function:

    Function clr(R As Range) As Integer
    With R.Interior
    clr = .ColorIndex
    End With
    End Function

    will return a number representing the background color of a cell. For
    example, if you enter =clr(A1) in a cell you will have the color of the
    backgroun in call A1

    Good Luck
    --
    Gary's Student


    "Melkett" wrote:

    > I have a spreadsheet with approx. 10000 rows. And i would like to select and
    > copy the yellow rows and paste them to another sheet. Or delete cells which
    > are not yellow.
    >
    > I think that i can do it by putting an if statement in each row and filter
    > them.
    > For example, excel will type 1 if the is yellow, else 0. Then it will be
    > easy to select and copy them. But how?
    >
    > Or do you have any idea other than "if statement"
    > I need yor help. 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.2.0