+ Reply to Thread
Results 1 to 9 of 9

Linking two formulas for text conversions to numerical expressions

  1. #1
    Registered User
    Join Date
    09-26-2014
    Location
    UK
    MS-Off Ver
    2010, 2007
    Posts
    23

    Angry Linking two formulas for text conversions to numerical expressions

    Data extract from xxx program gives quantities in a text format. I need to multiply the quantities and express them numerically.

    Example:
    Program output:
    1 x 28 tablet pack
    2 x 32 tablet pack
    5 x 100 tablet pack
    8 x 8400 tablet pack

    After using the formula =LEFT(A2;SEARCH(" ";A2;1))*MID(A2;4;4)*1

    28
    64
    500
    6720

    Which is what i need but when the first number is not single i.e.

    12 x 28 tablet pack

    I have to use formula =LEFT(A2;SEARCH(" ";A2;1))*MID(A2;5;4)*1 which gives the correct result.

    How to link those formulas to create ONE formula that will work for both single and double digits???

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Linking two formulas for text conversions to numerical expressions

    just use this instead:
    Please Login or Register  to view this content.
    well, that uses comma-separation, you might have to swap those out for semicolons if that's what your excel settings are.

  3. #3
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Linking two formulas for text conversions to numerical expressions

    Have you tried 'text to column' with you program output?
    Then you get the numbers in a different column and you can easy multiply.
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Linking two formulas for text conversions to numerical expressions

    I tested starting in A4 and down. Try this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    09-26-2014
    Location
    UK
    MS-Off Ver
    2010, 2007
    Posts
    23

    Re: Linking two formulas for text conversions to numerical expressions

    Thank you for the reply but this doesn't multiply the numbers.
    If
    1 x 28 tablet pack
    the result should be 28
    but if
    2 x 32 tablet pack
    the result should be 64
    or if
    12 x 28 tablet pack
    the result should be 336

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Linking two formulas for text conversions to numerical expressions

    wraithu

    Which post are you responding to?

  7. #7
    Registered User
    Join Date
    09-26-2014
    Location
    UK
    MS-Off Ver
    2010, 2007
    Posts
    23

    Re: Linking two formulas for text conversions to numerical expressions

    =IF(FIND(" ",A4,1)=2, LEFT(A4,SEARCH(" ",A4,1))*MID(A4,4,4)*1,LEFT(A4,SEARCH(" ",A4,1))*MID(A4,5,4)*1)

    Worked!

    Thank you very much!

  8. #8
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Linking two formulas for text conversions to numerical expressions

    with the MID explicitly wrapped into your existing function:

    Please Login or Register  to view this content.

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Linking two formulas for text conversions to numerical expressions

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Linking numerical value occurrence to a date
    By b_rianv in forum Excel General
    Replies: 47
    Last Post: 07-23-2014, 09:38 PM
  2. Linking numerical values to text?
    By Johnrciveng in forum Excel General
    Replies: 2
    Last Post: 06-12-2012, 12:20 PM
  3. Linking 'text' into formulas
    By matthewbailey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2007, 09:03 AM
  4. can a conditional formulas be setup using text to get a numerical
    By abe in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-05-2006, 01:50 PM
  5. [SOLVED] Time calculations & text conversions
    By Kenny Hubbard in forum Excel General
    Replies: 1
    Last Post: 02-05-2005, 07:06 PM

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