+ Reply to Thread
Results 1 to 5 of 5

SUMPRODUCT Critera - If range values start with number

  1. #1
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Question SUMPRODUCT Critera - If range values start with number

    Hello all!

    I'm trying to count the number of records I have that are 6 characters long and begin with a 6.

    I using SUMPRODUCT at the moment, but I'm having issues with the text strings (technically, all values are stored as text).

    I've got just under a million rows, so helper column / filter won't work because this locks up Excel.

    Please Login or Register  to view this content.

    =SUMPRODUCT((LEN(A1:A7)=6)*(LEFT(A1:A7,1)*1=6))

    The second half of this is where my logic falls apart. The strictly text rows evaluate to #VALUE and I'm not sure how to circumvent this.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMPRODUCT Critera - If range values start with number

    It's because some of the values begin with a Letter
    LEFT(A###,1) = A letter
    Letter*Number = #VALUE

    Here's an outside the box solution, assuming the numbers are whole numbers, no decimal values.

    =SUMPRODUCT((A1:A7>=600000)*(A1:A7<=699999))

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: SUMPRODUCT Critera - If range values start with number

    As these values would not match the desired criteria, you could wrap the SUMPRODUCT in IFERROR to get rid of the #VALUE errors.

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: SUMPRODUCT Critera - If range values start with number

    Hi,

    maybe

    Please Login or Register  to view this content.
    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMPRODUCT Critera - If range values start with number

    Think I missed the part about the values being Stored As Text...

    Try

    =COUNTIF(A1:A7,"6?????")

+ 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] Add total values based on within range based on critera
    By johnny_p in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2013, 06:50 AM
  2. [SOLVED] Providng range start value and end value where all values are the same
    By ejafus in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-07-2012, 04:06 PM
  3. Add values in a column to a number and then start again
    By lilcheung in forum Excel General
    Replies: 4
    Last Post: 07-15-2012, 04:14 PM
  4. Search named range for multiple matches to critera and return date & values
    By a.mack123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-18-2011, 10:07 AM
  5. Working with a range knowing the start and the end values
    By Snake Pliskin in forum Excel General
    Replies: 2
    Last Post: 10-30-2007, 12:50 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