ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional Filtering with cell format (https://www.excelbanter.com/excel-programming/312548-conditional-filtering-cell-format.html)

ltong

Conditional Filtering with cell format
 
Hi,

I wonder in excel functions or excel VBA, is there anyway that those
cells being highlighted by colors,fonts bold ( ie via cell format) in
certain columns of database, can be filtered row by row with category,
say

1st category is red font bold with yellow pattern
2nd category is just light blue pattern
3ed category is font italic bold or underline

The result is to be seen same as auto-filtering functions.

Thanks
Regards
Lenard

Tom Ogilvy

Conditional Filtering with cell format
 
Filter work on cell values, so you would need to write User Defined
functions that evaluated the color of the target cells and return the
category. Then put this function in the next available column on each row
with reference to the cell to be evaluated for that row. Then filter the
category returned.

If the coloring is produced by conditional formatting, then you would just
duplicate the conditional formatting formula in a dummy column with an
adjustment to have it return the proper category. Then filter on this
column.

--
Regards,
Tom Ogilvy

"ltong" wrote in message
om...
Hi,

I wonder in excel functions or excel VBA, is there anyway that those
cells being highlighted by colors,fonts bold ( ie via cell format) in
certain columns of database, can be filtered row by row with category,
say

1st category is red font bold with yellow pattern
2nd category is just light blue pattern
3ed category is font italic bold or underline

The result is to be seen same as auto-filtering functions.

Thanks
Regards
Lenard




ltong

Conditional Filtering with cell format
 
Hi Tom,

Thanks for your suggestions and kindly devise an excel VBA code ( ie
UDF) to run the situation with a simple example include the following
conditions : -
say

1) 1st category is red font bold with yellow pattern
2) 2nd category is just light blue pattern
3) 3rd category is font italic bold and underline

Regards
Lenard



"Tom Ogilvy" wrote in message ...
Filter work on cell values, so you would need to write User Defined
functions that evaluated the color of the target cells and return the
category. Then put this function in the next available column on each row
with reference to the cell to be evaluated for that row. Then filter the
category returned.

If the coloring is produced by conditional formatting, then you would just
duplicate the conditional formatting formula in a dummy column with an
adjustment to have it return the proper category. Then filter on this
column.

--
Regards,
Tom Ogilvy

"ltong" wrote in message
om...
Hi,

I wonder in excel functions or excel VBA, is there anyway that those
cells being highlighted by colors,fonts bold ( ie via cell format) in
certain columns of database, can be filtered row by row with category,
say

1st category is red font bold with yellow pattern
2nd category is just light blue pattern
3ed category is font italic bold or underline

The result is to be seen same as auto-filtering functions.

Thanks
Regards
Lenard



All times are GMT +1. The time now is 10:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com