Now, I want to get all the rows with the same backgrou开发者_Go百科nd color in a sheet. How do I filter out all the rows with the same background color in Excel 2003?
Updated:
I have added the function to my Excel, and the function is in the insert function which is under the "User Defined" category.
But I don't know how to use it. Now, if I want to show all the data with the same background color as the A1:I1
on the sheet1, how do I do it?
Within a module you can add this function:
Function CellColour(rngIn As Range) As Long
Application.Volatile True
CellColour = rngIn(1).Interior.ColorIndex
End Function
Then you recall it as a native formula
=CellColour(A1)
Apply it to the range you need and filter on the number returned by the formula.
精彩评论