+ Reply to Thread
Results 1 to 3 of 3

Simple formula - not working! WHY?

  1. #1
    Registered User
    Join Date
    09-10-2015
    Location
    Caringbah, NSW, Australia
    MS-Off Ver
    Office 365
    Posts
    43

    Simple formula - not working! WHY?

    In the attached workbook there is a sumif function that simply will notwork. I am sure I have it right but why will it not produce the expected results in the yellow shaded row/column>
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Simple formula - not working! WHY?

    I will try to say this gently, but if a formula does not give you the correct result, you do not have it right.

    This formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    says: For every cell in $A2 that has a value of taxi, add the corresponding cell in the range B2:D2. However, A2 is just one cell, and A2 is "Taxi". So it will give you the first value in the range B2:D2, which is 1. Every other formula is doing the same thing, just a different row or column.

    I can't tell you the correct formula unless you describe what you want the results to be. It's hard to guess from what is in this file. Also helpful to show an actual example of desired results.

    My best guess is that for each row, you want to sum the numbers for the column headers that match the row header. So maybe this:

    Values as displayed
    A
    B
    C
    D
    E
    1
    Taxi
    School
    Private
    2
    Taxi
    1
    2
    3
    1
    3
    School
    2
    3
    4
    3
    4
    Private
    3
    5
    6
    6
    5
    1
    3
    6

    Underlying formulas
    A
    B
    C
    D
    E
    1
    Taxi
    School
    Private
    2
    Taxi
    1
    2
    3
    =SUMIF($B$1:$D$1,$A2,$B2:$D2)
    3
    School
    2
    3
    4
    =SUMIF($B$1:$D$1,$A3,$B3:$D3)
    4
    Private
    3
    5
    6
    =SUMIF($B$1:$D$1,$A4,$B4:$D4)
    5
    =SUMIF($A$2:$A$4,B$1,B$2:B$4)
    =SUMIF($A$2:$A$4,C$1,C$2:C$4)
    =SUMIF($A$2:$A$4,D$1,D$2:D$4)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: Simple formula - not working! WHY?

    B5
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    dragged across

    E2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    dragged down
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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] Simple IF Formula not working correctly
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-18-2019, 07:41 AM
  2. [SOLVED] .Formula not working. I bet this is simple!
    By gedwards913 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-06-2015, 12:24 PM
  3. [SOLVED] Simple v look up formula is not working
    By ryan4646 in forum Excel General
    Replies: 11
    Last Post: 11-30-2013, 02:09 AM
  4. Simple minus formula not working
    By kakhuis in forum Excel Formulas & Functions
    Replies: 33
    Last Post: 08-05-2013, 11:20 AM
  5. Simple formula NOT working :(
    By Danny Lewis in forum Excel General
    Replies: 3
    Last Post: 08-01-2006, 05:40 AM
  6. [SOLVED] simple formula not working
    By Charles Shapiro in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-10-2006, 03:29 AM
  7. Simple Formula not working?
    By GETGO in forum Excel General
    Replies: 2
    Last Post: 01-06-2005, 08:50 AM

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