+ Reply to Thread
Results 1 to 15 of 15

Simplify Formula

  1. #1
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Simplify Formula

    Hi all, I have a column of formula's which give results for a search but need to simplify a formula to get it to extract the numbers within the result and multiply them all.

    One of the results is:

    [AWA 3x1x4x1x2]

    and I need to get rid of the first part [AWA] to then get a result of the rest.

    This would give me ? number then I could multiply it by an additional number.

    The result is not always the same, the result could be:

    [AWA 3x1x2] or [SWA 2x1x4] etc etc.

    Thanks for any help.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Simplify Formula

    Try:

    Please Login or Register  to view this content.
    where A1 contains your original string.

    You must confirm this formula with CTRL+SHIFT+ENTER not just ENTER. You will see { } brackets appear around the formula.

    This formula will extract and multiply out the numbers... no need to eliminate text
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Simplify Formula

    Another way would be to create a named range, eg:

    Please Login or Register  to view this content.
    You can then use this reference in your formulae... so assuming A1 holds:

    Please Login or Register  to view this content.
    Then to get the result of the above

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Re: Simplify Formula

    Thanks for your help, I tried first version to no avail but the assistance from DonkeyOte is leading me in thr right direction - can the formula be written in column B and my results in column A, so B1 adds up A1, B2 for A2 and so on? If I try at present I get a #value - im working within excel 2002.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Simplify Formula

    Quote Originally Posted by sparx View Post
    Thanks for your help, I tried first version to no avail
    After you entered my formula, did you hold down the CTRL+SHIFT keys and then hit ENTER?

  6. #6
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Re: Simplify Formula

    Yes I did, all I got was a 0 value

  7. #7
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Re: Simplify Formula

    When I done as you described it placed {} around the formula but still gave me a 0 - I will try again within excel 2002 and not excel for vista.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Simplify Formula

    See attached... it worked for me, seemingly.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Re: Simplify Formula

    NVBC please accept my appologies, your version also works and works fine. Thank you, and thank you DonkeyOte for your help too.

  10. #10
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Re: Simplify Formula

    NVBC, please can I ask for additional help, if my original result is AWA 1x4x2x3x150, how could your formula remove the first part AWA before the space and leave out the last part after the last x so the formula would only see 1x4x2x3?

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Simplify Formula

    Not sure if you are asking for how the formula works, or for another formula entirely that extracts just the middle part?

    Please clarify.

    BTW, it's NBVC

  12. #12
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Re: Simplify Formula

    the formula works out cable lengths - and one section i need will show the cable type in this example AWA or SWA then the number of times each cable is run maybe 3x1x4 so is 3 sets of 1 lot of 4 or 12 cables and the last part is the size of the cable - so result is normally SWA 2x1x4x150 or AWA 3x1x4x240 - all I need is the 2x1x4 or the 3x1x4 part then I will use this result to multiply all the cable of that size found, hope this helps.

  13. #13
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Simplify Formula

    Try:

    =MID(A1,FIND(" ",A1)+1,FIND("^^",SUBSTITUTE(A1,"x","^^",3))-FIND(" ",A1)-1)

    this assumes you have consistant format... i.e. AxBxCxD

  14. #14
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Re: Simplify Formula

    NBVC, thanks - between both your formula's I can now work out the sums I need - thanks for yout time.

  15. #15
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Simplify Formula

    Please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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