+ Reply to Thread
Results 1 to 6 of 6

Is there a way to reference bold items within a formula?

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    2

    Is there a way to reference bold items within a formula?

    I have a spreadsheet in Excel 2003 where one column where some items are bolded and some aren't. The issue is I would like to make a function that would be able to recognize the bolded items and divide those by 12 but not divide the non-bolded items. I have searched and have been unable to find if there is away Excel can differentiate bolded items from nonbolded items. Any help would be appreciated. Thanks.

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

    Re: Is there a way to reference bold items within a formula?

    try this code
    put in a new module
    select the range you want to do
    run the macro
    Please Login or Register  to view this content.
    "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

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Is there a way to reference bold items within a formula?

    Hi, and welcome.

    You'll need a custom function to determine if a cell is formatted bold.

    This code is a start.
    Please Login or Register  to view this content.
    In your application, you could use it like this

    =IF(ISBOLD(A1),A1/12,A1)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Is there a way to reference bold items within a formula?

    Hi,

    One way, assuming just one contiguous run of bold digits would be

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    01-10-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Is there a way to reference bold items within a formula?

    Thanks for the replies. I am new to Visual Basic but it was easy with the formulas provided. It works and will save me a lot of time in the future. Thanks again!

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Is there a way to reference bold items within a formula?

    Hi,

    It sounds like you've worked it out.
    My code may be unnecessarily complicated since I'd assumed your request was indicating that the cell characters was a mixture of alpha numeric characters with the numerics bolded and you wanted to identify the numeric and divide by 12.

    e.g. with 'abcde144def' in A1, =BoldDivide(A1) would return 12


    From other responses it seems that the whole cell is either numeric or not.

+ 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