+ Reply to Thread
Results 1 to 6 of 6

How to Select based on format ?

  1. #1
    Registered User
    Join Date
    05-20-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    26

    How to Select based on format ?

    Hello Experts,

    I have one column which has list of records (only character type) - I just want to Filter those records which are BOLD.

    for instance:

    Ram
    Shayam
    Tony
    Guy
    Julie
    Sandy
    Mandy

    Result should be

    Tony
    Julie
    Sandy

    Because all three records are in BOLD.

    Can somebody please tell me how to achieve this ?

    Waiting for your reply

    A
    Last edited by ischopra; 07-18-2011 at 09:39 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: How to Select based on format ?

    Excel does not offer a way to sort or filter on text formatting (bold, italic, etc.), nor any way to even detect it.

    You can write your own user-defined function to do this:
    Please Login or Register  to view this content.
    This function will return TRUE if the referenced cell is bold, otherwise FALSE. If more than one cell is referenced, it looks at the cell in the upper-left corner of the range.

    In Excel, hit ALT-F11. That opens the VBA development window. On the left you will see a hierarchy structure that includes the file you have open. Right-click on that file name, then Insert, then Module. You will see a new item under your file called Module1. Double click on it, and you will see a blank screen to the right. Then paste in the code above. Then you can close this window.

    Then you can use the function

    =IsBold(A1)

    to return the boldness of the font in a second column, and filter on the second column.

    Note that Excel will not refresh the value of this function if the boldness of the referenced cell changes; the function is reevaluated only if the value of the cell changes, and Excel does not consider a format change to be a change in value. So if you need to refresh the values, you have to manually reapply the function (e.g., F2, ENTER, then fill down).
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-20-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: How to Select based on format ?

    thanks for the response,

    when i hit alt+F11 it just opens up new sheet.

    what to do ?

  4. #4
    Registered User
    Join Date
    05-20-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: How to Select based on format ?

    Hey,

    did it somehow... thanks for the valuable information

    Cheers !

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: How to Select based on format ?

    Are you sure you're hitting ALT and F11 at the same time? If not, Excel will do nothing, or possibly create a new chart sheet.

    You should see something like this

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to Select based on format ?

    you can filter in excel 2007 by
    copying the range you want to filter next to itself
    then in the copied column
    find format bold
    replace with say xxxxxxxx
    then filter that column on xxxxxxxx
    or simply in the original
    find what----- choose format select bold
    replace -format - chose a cell colour say yellow background
    all the bold cells will then have a yellow background
    you can then filter by colour yellow
    Last edited by martindwilson; 07-18-2011 at 09:51 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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