+ Reply to Thread
Results 1 to 8 of 8

Need Formula to tell me the contents of other formulas

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    California
    MS-Off Ver
    Excel 2016
    Posts
    22

    Cool Need Formula to tell me the contents of other formulas

    Hey guys...

    I need a little help... Is there any formula that can look in a cell and tell me if there is a "+" in it?

    Ie: Cell A1 =5+7
    Cell A1 shows 12
    Is there a way to pull the 5 and 7 out separately, or at least tell me if the cell has a + in it as opposed to being just a single number?


    Thanks in advanced guys!

    Cheers

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need Formula to tell me the contents of other formulas

    You can switch back and forth to "Show Formulas" with CNTRL SHFT ~
    Does that help?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    08-21-2012
    Location
    California
    MS-Off Ver
    Excel 2016
    Posts
    22

    Re: Need Formula to tell me the contents of other formulas

    Unfortunately not... I need to perform an operation, or at least call attention to cells containing more the sum of more than one number...

    Good thinking though

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need Formula to tell me the contents of other formulas

    There is no Function. There's not even a direct function to tell if it's a formula until Excel 2013. You could create a function using VBA.

  5. #5
    Registered User
    Join Date
    08-21-2012
    Location
    California
    MS-Off Ver
    Excel 2016
    Posts
    22

    Re: Need Formula to tell me the contents of other formulas

    Thanks again Chemist ... If it's not too much trouble, an example of the VBA code would be awesome!

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need Formula to tell me the contents of other formulas

    Okay, we can use a simple UDF to get the formula (in the VBA editor, insert a module and put this into it)
    Please Login or Register  to view this content.
    Then you can use this formula to count the number of plus signs
    =LEN(GETFORMULA(A1))-LEN(SUBSTITUTE(GETFORMULA(A1),"+",""))
    Is that what you are looking for?

  7. #7
    Registered User
    Join Date
    08-21-2012
    Location
    California
    MS-Off Ver
    Excel 2016
    Posts
    22

    Re: Need Formula to tell me the contents of other formulas

    This serves my purposes perfectly ... A little more complicated than I had hoped, but seems to be working like a charm ...

    Thanks ChemistB!!!!!

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need Formula to tell me the contents of other formulas

    If you are always going to be looking for Pluses, you can use this UDF
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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