+ Reply to Thread
Results 1 to 5 of 5

Formula to create a total based on an IF condition

  1. #1
    Registered User
    Join Date
    02-28-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    5

    Question Formula to create a total based on an IF condition

    I sell products to Nurses and Teachers.
    In one column I have a drop down, where I flag the product as Nurse or Teacher. In the next column I have the amount (this is variable not constant).
    I am trying to write a formual that will total the number of products sold to a Teacher (based on the value in the drop down) and to total the corresponding amount to provide a total for Teachers for the month.

    So in logical terms it is. IF product = Teacher, then add product amount to monthly total.

    Is this doable without having to separate out my products to separate columns?

  2. #2
    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,425

    Re: Formula to create a total based on an IF condition

    You can use SUMIF, SUMIFS, SUMPRODUCT (overkill) or a Pivot Table.
    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


  3. #3
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Formula to create a total based on an IF condition

    tubefeed; Are you able to post a sample file?

  4. #4
    Registered User
    Join Date
    02-28-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Formula to create a total based on an IF condition

    I have attempted an attachement but the interface is weird so not sure if it has uploaded or not
    Attached Files Attached Files

  5. #5
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,408

    Re: Formula to create a total based on an IF condition

    Try this, the yellow cells are already MARK in your attachment, is it the result you want

    C31 cell formula
    HTML Code: 
    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] How to total cells based on if condition?
    By OM2 in forum Excel General
    Replies: 4
    Last Post: 08-23-2018, 03:13 PM
  2. [SOLVED] Create a formula to fill a range with a preset value to achive a total. Total will vary
    By bajdr47 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-08-2017, 10:47 AM
  3. [SOLVED] How to Create a If, Then Formula to Gray-out cells based on the If condition.
    By mmallard in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-25-2015, 08:02 PM
  4. [SOLVED] sumproduct of total based on condition
    By aroyale15 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-30-2013, 12:20 AM
  5. [SOLVED] Create a list based on whether a condition was met
    By dkrzysik in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-02-2013, 08:08 AM
  6. create new workbook based on condition
    By kiranindia1986 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-21-2010, 12:05 AM
  7. Count total based on condition.
    By Gauntsghost in forum Excel General
    Replies: 4
    Last Post: 01-18-2010, 09:36 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