+ Reply to Thread
Results 1 to 5 of 5

Do I need to use SUMIF?

  1. #1
    Registered User
    Join Date
    12-24-2014
    Location
    albany ny
    MS-Off Ver
    2010
    Posts
    18

    Do I need to use SUMIF?

    In the attached spreadsheet, I need to add the mileage for each day. L3 contains the total mileage for the day.

    In L7:L10 it tells me whether the trip is One Way (OW) or Round Trip (RT). The mileage in column M is ALWAYS for one way (my cost is calculated if it is one way or round trip automatically). I need a formula in L3 that will double the mileage if the TRIP in column L says "RT."

    Can anyone help with this? Thanks!! travel book template.xlsx

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

    Re: Do I need to use SUMIF?

    Try

    =SUMPRODUCT(M7:M100,(RIGHT(L7:L100,3)=" RT")+1)

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Do I need to use SUMIF?

    You can use this array* formula:

    =SUM(IF(RIGHT(L7:L10,2)="RT",2,1)*(M7:M10))

    *An array formula needs to be committed using the keystrokes <CTRL><SHIFT><ENTER> (CSE), rather than the usual <Enter>.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    12-24-2014
    Location
    albany ny
    MS-Off Ver
    2010
    Posts
    18

    Re: Do I need to use SUMIF?

    Perfect! Thank you!

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

    Re: Do I need to use SUMIF?

    You're welcome.

+ 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. Replies: 4
    Last Post: 12-04-2014, 02:06 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] Shorten SUMIF + SUMIF + SUMIF each with same reference range but different criteria???
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-13-2014, 09:25 PM
  4. SUMIF or SUMIF's formula with multiple criteria
    By jackiemariee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2013, 06:19 PM
  5. Nested SUMIF statement or multiple SUMIF's
    By Dan27 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-17-2009, 06:55 AM

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