+ Reply to Thread
Results 1 to 5 of 5

SUM ARRAY Formula Issue - Probably an easy one...

  1. #1
    Registered User
    Join Date
    10-14-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    47

    SUM ARRAY Formula Issue - Probably an easy one...

    In my raw data I have two single-column OFFSET Named Ranges; [PlantID]; [SqFootage].

    In my output sheet, I am attempting to SUM square footage p/PlantID. There are several rows in the raw data table that may have the same PlantID. The issue is that some of the PlantID's are whole integers (e.g. 300), while some PlantID's are alpha/numeric strings (e.g. 1A1). Currently I am receiving output ONLY for the PlantID's that contain both number AND text (e.g. 1A1), however, I get no results for the whole integer PlantID strings...

    I have validated my OFFSET Named Ranges and they are working as intended. Here is my SUM ARRAY formula:
    {=SUM(IF((PlantID = D3), SqFootage))}

    *Does anyone know why my results are only outputting for alpha/numeric strings in the [PlantID] column, yet discarding the whole integer PlantID's?
    Last edited by huntethic; 04-10-2015 at 09:54 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: SUM ARRAY Formula Issue - Probably an easy one...

    we'd have to see your dataset to be certain, but i'd guess either D3 or the "integer" PlantID's are actually text... make sure the formatting between those two items is exactly the same (add a ' before the number to make it text)
    Hope I could help - if your post has been solved don't forget to mark it as such.

    Clicking the * below is a great way to say thanks!

    "Drowning in 10 feet of water isn?t any different than drowning in a million feet. And if you can swim, it doesn?t matter how deep the ocean is. At some level, once you realize you?re in water that?s too deep to stand, you have to have a very different approach," - Joi Ito

  3. #3
    Registered User
    Join Date
    10-14-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: SUM ARRAY Formula Issue - Probably an easy one...

    Ended up with the ' symbol addition as a fix, but I still wonder why it won't recognize both string types. Either way, solution discovered for now - thank you

  4. #4
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: SUM ARRAY Formula Issue - Probably an easy one...

    it is because numbers are not a string... my programming knowledge is fairly limited, so i can't quite tell you exactly why this is the case, but basically every data management software with which i've interacted gets rather upset if you try to combine data types (i.e. strings and integers). this is one of the most common issues i see with people trying to use vlookup() or match() - they are looking for a string in a series of integers or vice-versa. i also run into it fairly regularly when trying to write vba - not knowing which data type is going to be returned by a specific formula can be problematic.

    My preferred solution is to ensure consistency in data types across the board - always ensure that numbers and strings do not mix, especially within the same column. sometimes this means working with the person who provides your input(s) to ensure they provide data in a format which is appropriate for your needs.

    anyway, glad i could help, don't forget to mark the post as solved!

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: SUM ARRAY Formula Issue - Probably an easy one...

    Try using a regular SUMIF function - you don't need "array entry" and SUMIF is "agnostic" when it comes to data type in the criteria, I.e it will match text values with numbers and vice versa as long as the actual content is the same

    =SUMIF(PlantID,D3,SqFootage)
    Audere est facere

+ 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. Advanced Excel- Array formula issue
    By PatCell in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-05-2015, 09:02 PM
  2. Array formula issue
    By dushtin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-27-2013, 11:53 AM
  3. Array / Concatenate formula issue
    By Ozwilly in forum Excel General
    Replies: 6
    Last Post: 10-27-2011, 04:41 AM
  4. [SOLVED] Tricky array formula issue - Using array formula on one cell, then autofilling down a range
    By aspenbordr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2005, 11:05 AM
  5. [SOLVED] Easy copy of an Array Formula with Dynamic Value...
    By Dennis G. in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-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