+ Reply to Thread
Results 1 to 4 of 4

difference between 1.1 and 1.10 when returning SUMIF

  1. #1
    Registered User
    Join Date
    07-21-2017
    Location
    London
    MS-Off Ver
    2013
    Posts
    1

    difference between 1.1 and 1.10 when returning SUMIF

    Hi,

    I have an excel sheet which uses a number ref to tally up the values associated with it, so i'll have on one sheet:

    Item REF Price
    banana's 1.1 £2.56
    chips 4.5 £5.80
    potatoes 2.7 £1.19
    apples 1.10 £3.20

    And on another "totals" sheet a sumif formula:
    =SUMIF(sheet1!E7:E200,A1,sheet1!F7:F200) - Cell A1 has the value 1.1 in it
    +SUMIF(sheet1!E7:E200,A2,sheet1!F7:F200) - Cell A2 has the value 1.2 in it
    and so on till we get to
    +SUMIF(sheet1!E7:E200,A10,sheet1!F7:F200) - Cell A2 has the value 1.10 in it

    The problem is the formula cant distinguish between 1.1 and 1.10 - so it would return the value of £5.76 for 1.1 and 1.10 instead of £2.56 in 1.1 and £3.20 in 1.10.

    Does anyone have a solution to this issue - I have tried changing the cell format to text/ number with 1 decimal point, general etc but it doesn't work??

    Many thanks JD

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,099

    Re: difference between 1.1 and 1.10 when returning SUMIF

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: difference between 1.1 and 1.10 when returning SUMIF

    This works

    =SUMPRODUCT((Sheet1!E7:E200=A1)*(LEN(Sheet1!E7:E200)=LEN(A1))*(Sheet1!F7:F200))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,099

    Re: difference between 1.1 and 1.10 when returning SUMIF

    Never mind... assuming that in your sheet the yellow cells are pr-formatted as TEXT, use:

    =SUMPRODUCT(($B$2:$B$5=F2)*C2:C5)
    Attached Files Attached Files

+ 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] SUMIF with a difference maybe? I'm stuck
    By tgljl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-24-2015, 11:56 PM
  2. Subtracting from the SUMIF with the difference from the SUMIF range
    By iamblue91 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2014, 09:01 PM
  3. [SOLVED] Returning value if there is a difference
    By deancorleone in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2013, 05:04 AM
  4. [SOLVED] Formula Validation - Returning Description or $ Difference
    By PERE in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-27-2013, 12:34 AM
  5. Calculating a running difference then returning last non-negative date
    By emdee in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-04-2013, 08:39 PM
  6. How to SUMIF on a difference?
    By HooGolfer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-27-2009, 11:46 PM
  7. sumif function with a difference
    By ozcank in forum Excel Formulas & Functions
    Replies: 58
    Last Post: 09-06-2005, 03:05 PM

Tags for this Thread

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