+ Reply to Thread
Results 1 to 4 of 4

Thread: sum alphanumeric cells

  1. #1
    Registered User
    Join Date
    12-10-2011
    Location
    portugal
    MS-Off Ver
    Excel 2003
    Posts
    1

    sum alphanumeric cells

    hi, i have a sheet with a bunch of alphanumeric values and blanks and i need to sum and then make a diference of the values that show like debit.
    below is an example of the data that i have, can you help me with a formula or macro to solve this.
    Notice that there is same blank cells in the midle.
    tks

    CONTRACTS_SELECTED //TRANSACTION_AMOUNT //TRANSACTION_TYPE
    08-12-2011 11:49 // 43,00 EUR // DEBIT
    07-12-2011 18:51 // 243,50 EUR // CREDIT
    07-12-2011 18:47 //4,00 EUR // CREDIT
    07-12-2011 18:43 //145,86 EUR // CREDIT
    07-12-2011 18:39 //797,48 EUR // CREDIT
    07-12-2011 18:35 // 371,48 EUR// DEBIT
    // - //
    // - //
    07-12-2011 18:30 //287,48 EUR// CREDIT
    07-12-2011 18:25 //287,36 EUR// CREDIT

    07-12-2011 18:04 //287,50 EUR// CREDIT
    07-12-2011 17:52 //291,48 EUR// DEBIT
    07-12-2011 17:51 //291,48 EUR// CREDIT

  2. #2
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,165

    Re: sum alphanumeric cells

    You will need a helper column to split the transaction_amount. I used this formula
    =LEFT(B2,LEN(B2)-4)*1
    to convert it to a number. Once you have this, then you can do a sumif on this helper column.
    Look here for how that works.
    http://www.techonthenet.com/excel/formulas/sumif.php

  3. #3
    Valued Forum Contributor dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    New Delhi, India
    MS-Off Ver
    Excel 1997, 2000, XP, 2003, 2007, 2010
    Posts
    2,403

    Re: sum alphanumeric cells

    Hi bicas,

    Assuming you have this data in Column A, use following in column B and drag it down:-

    =VALUE(SUBSTITUTE(TRIM(MID(A2,SEARCH("//",A2)+2,(SEARCH("EUR",A2)-SEARCH("//",A2)-2))),",",""))
    Now for Debit sum, use following formula:-

    {=SUM(IF(ISNUMBER(SEARCH("DEBIT",$A$2:$A$15)),$B$2:$B$15,""))}
    and for Credit sum, use following formula:-
    {=SUM(IF(ISNUMBER(SEARCH("CREDIT",$A$2:$A$15)),$B$2:$B$15,""))}
    Debit and Credit formula are array ones and need to be entered using shift+ctrl+enter key combination.

    I hope this solves your issue.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey
    +919810929744
    dilipandey@gmail.com

  4. #4
    Valued Forum Contributor Haseeb A's Avatar
    Join Date
    05-24-2011
    Location
    India | Kwt
    MS-Off Ver
    2007
    Posts
    1,460

    Re: sum alphanumeric cells

    Assume Col_A is Contracts, Col_B is Transaction Amount, Col_C is Type.

    So, try this

    =SUM(IF(C$2:C$15="Debit",--(0&TRIM(SUBSTITUTE(SUBSTITUTE(LOWER(B$2:B$15),"eur",""),",","")))))

    Confirmed with CTRL+SHIFT+ENTER.

    Change Debit to Credit for Cr values.
    HTH; Haseeb

    If your problem is solved, please say so clearly, and mark your thread as Solved:
    Forum Rules & How to Mark a thread as SOLVED

+ 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.2.0