+ Reply to Thread
Results 1 to 9 of 9

SUMIF a text formula

  1. #1
    Registered User
    Join Date
    11-29-2010
    Location
    Cyprus
    MS-Off Ver
    Excel 2003
    Posts
    5

    SUMIF a text formula

    Hi All!

    This is my first post/thread in this forum.

    I have a problem figuring out how to convert a text formula to something readable in Excel.
    Here are the details:

    I have many rows that have a specific identification value designated at column A.
    If I want to add all these lines I use SUMIF formula to add all the rows' specific cell. This totalling row has value A1.

    The real problem is when I have another line where I want to add two or more different totalling lines like the one above. I want to read a formula A1+A2+A3...+An

    So my question is how do I split the formula A1+A2+A3...+An so Excel can recognise that I want to sum up cells A1, A2, A3..An?

    Thanks in advance!

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: SUMIF a text formula

    Hi Jackies, welcome to the forum.

    Are you just looking to sum various cell values?

    =SUM(A1,A2,A3)

    or

    =SUM(A1:A3)

  3. #3
    Registered User
    Join Date
    11-29-2010
    Location
    Cyprus
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: SUMIF a text formula

    Thanks Paul for the welcome note

    What I want is read a cell value for example A1+A2+A3 and find a formula that will look for rows with cell values A1, A2 and A3 and add them.

    Thanks

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: SUMIF a text formula

    I'm afraid you'll have to post an example workbook, as I'm still not understanding it for some reason. In the sample, provide data that matches your real data in format, variety and layout, and then show what your expected results should be and why.

    Thanks!

  5. #5
    Registered User
    Join Date
    11-29-2010
    Location
    Cyprus
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: SUMIF a text formula

    I'm using an excel add-in called Jet Reports, used to extract information from Microsoft Navision tables.

    I have attached a file that shows the problem. The cell I want to calculate is E27.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: SUMIF a text formula

    If the answer is supposed to be 3200, you could use something like:

    =INDEX(E4:E25,MATCH("A1",A4:A25,0))+INDEX(E4:E25,MATCH("A2",A4:A25,0))+INDEX(E4:E25,MATCH("A3",A4:A25,0))

    It's simply looking for each reference in column A and returning the corresponding value from column E, then adding them together.

    Another option would be to give the cells you want to total a defined name. You can't define a name as A1, A2 and A3 though, as those already are named ranges (cells A1, A2 and A3). If you named them "TA" (for Total Assets), "TL" (for Total Liabilities) and "SCR" (for Share Capital and Reserves) you could then type a formula like:

    =TA+TL+SCR

    If neither option works, a UDF could be coded so that you could essentially do the INDEX/MATCHING from the first example, but in the cell you would only have a small function, like

    =MySum(TA,TL,SCR)

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: SUMIF a text formula

    Perhaps try

    =SUM(SUMIF(A2:A26,{"A1","A2","A3"},E2:E26))
    Audere est facere

  8. #8
    Registered User
    Join Date
    11-29-2010
    Location
    Cyprus
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: SUMIF a text formula

    Thanks guys for your input

    The file I have attached is an example of how the data is retrieved and should be presented in the report. However, the actual Jet Report retrieves information from Navision and I use IF statements to guide the formula what to do with the data. My formula is in a single cell to perform dynamically.

    I want a formula that can interpet Totaling column and triger SUMIF function. So far I was able to use SUMIF where - for example - Totaling value is 2 and I add all the Amount cells with Row No. 2. In the case of addition like A1+A2+A3, the formula has to identify A1, A2 and A3 and perform separate SUMIF for each one, adding the results at the end.

    I have attached the actual file created with Jet Reports and the IF, SUMIF statements in cell I7
    Last edited by jackies; 12-01-2010 at 02:43 AM.

  9. #9
    Registered User
    Join Date
    11-29-2010
    Location
    Cyprus
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: SUMIF a text formula

    Is this feasible?

+ 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