+ Reply to Thread
Results 1 to 5 of 5

Find nxn in a text and run the calculation

  1. #1
    Registered User
    Join Date
    10-16-2012
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    44

    Find nxn in a text and run the calculation

    Hi,

    I have the a column (A1:A5) with the following text:
    Can Al NNN 330 1x6 LowLands NL 1503
    Can Al AAA 330ml 4x6 NL 1403
    Can Al BBB 330ml 2x12 NL 1403
    Can Al CCC 500ml 4x NL 1403
    Can Al BBB 330ml x12 NL 1403


    I would like to create an extra column with the different opperation (nxn), So the next column (B1:B5)
    6
    24
    24
    4
    12

    there are some cases where I'm missing either (xn= or (nx) in these cases I just need to show n.

    If the function can't find nxn the value should be 1.

    I've attached an example.

    Thanks for your help.

    Book2.xlsx
    Last edited by mils; 10-28-2015 at 07:17 AM.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find nxn in a text and run the calculation

    Hi mils,

    Try this array formula in B1 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ***Array formula must be entered by using key combination of CTRL+SHIFT+ENTER and not just ENTER

    Data Range
    A
    B
    1
    Can Al NNN 330 1x6 LowLands NL 1503
    6
    2
    Can Al AAA 330ml 4x6 NL 1403
    24
    3
    Can Al BBB 330ml 2x12 NL 1403
    24
    4
    Can Al CCC 500ml 4x NL 1403
    4
    5
    Can Al BBB 330ml x12 NL 1403
    12
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,940

    Re: Find nxn in a text and run the calculation

    or can try
    =IFERROR(TRIM(RIGHT(SUBSTITUTE(LEFT(A1,FIND("x",A1)-1)," ",REPT(" ",LEN(A1))),LEN(A1)))+0,1)*IFERROR(TRIM(LEFT(SUBSTITUTE(REPLACE(A1,1,FIND("x",A1),)," ",REPT(" ",LEN(A1))),LEN(A1)))+0,1)
    Please Login or Register  to view this content.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Registered User
    Join Date
    10-16-2012
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Find nxn in a text and run the calculation

    Hi Alkey,

    thanks for your answers. The formula worked well for this 4 examples but I forgot to mention that I have also this kind of text
    Can Al dddd Vintage 330ml Mix 2015
    Can Al wwww Max 330ml 2014
    Can Al xxx Max 500ml BG

    which contains x.

    I've attached an example...[

    Book2.xlsx
    Attached Files Attached Files

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find nxn in a text and run the calculation

    Here is a modified formula

    Formula: copy to clipboard
    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)

Similar Threads

  1. Trying to find a calculation regarding weighting criteria
    By faraaz_h in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-28-2015, 04:38 PM
  2. Replies: 9
    Last Post: 12-21-2014, 06:29 PM
  3. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM
  4. find and config calculation cells
    By kryt0n in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2011, 10:41 AM
  5. Calculation to find bottom 25%
    By casdaq in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-23-2011, 01:45 PM
  6. Replies: 1
    Last Post: 01-12-2009, 03:05 AM
  7. [SOLVED] find calculation function
    By KELVIN in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2005, 08: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