+ Reply to Thread
Results 1 to 2 of 2

SumIF Based off first two digits

  1. #1
    Forum Contributor
    Join Date
    05-15-2015
    Location
    Orlando, FL
    MS-Off Ver
    Office Standard 2016
    Posts
    268

    SumIF Based off first two digits

    Is it possible to write a formula where it looks at the first "2" digits of a cell, and if its equal to the criteria it would then sum? For example, in range D6:D83 i have 8 digit cost codes. The first 2 digits are the criteria I would want to use. So in the sumif formula, if the first 2 digits were "06", i would want it to sum the amount in column H (H6:H83). Is that possible ?

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

    Re: SumIF Based off first two digits

    If the costcodes in D are stored as TEXT strings (numbers don't start with 0)
    You can do

    =SUMIF(D6:D83,"06*",H6:H83)

+ 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] remove three digits based on condition in excel?
    By notbanme in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2016, 06:55 AM
  2. [SOLVED] Sumif with only first two digits as criteria
    By jharvey87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2016, 05:07 PM
  3. Sorting data based on last 2 digits
    By NoahJEck in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-05-2015, 01:05 PM
  4. Hide rows based on the first 6 digits of cell
    By kmakjop in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2014, 09:09 PM
  5. Changing digits after decimal to specific digits based on a criteria
    By mpatel000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-28-2012, 02:41 AM
  6. VLookup based with different digits
    By koklok123 in forum Excel General
    Replies: 3
    Last Post: 03-25-2010, 08:40 PM
  7. How do I sort numbers based on last two digits?
    By The Wallaby in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2005, 06: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