+ Reply to Thread
Results 1 to 8 of 8

Totalling revenue each days for each vehicle where the revenue is in multiple rows.

  1. #1
    Registered User
    Join Date
    08-24-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Excel for mac 2015
    Posts
    29

    Totalling revenue each days for each vehicle where the revenue is in multiple rows.

    Attached is a workbook with two sheets.

    Sheet1 is some revenue and KPI data and Sheet2 is payroll data.

    I have created the columns with yellow headings.

    I've used a multi-conditional v-lookup formula to get the driver hours from Sheet2 using the JobDate and OperID. I've also omitted the rows i don't need by creating a formula that returns a YES or NO in the TP Movement Column. I only need the ones that say YES but i don't mind it the NO's are still there. The next column is the total revenue for the for that movement (Quantity x Rate).

    What i want it to do is sum the total revenue column for each FleetNum on each day (JobDate). For example i have manually totalled PM678 for 02/11/2015 in column AN13 but i want this to do it automatically.

    I hope this makes sense.


    Thanks of your help!!!!
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Totalling revenue each days for each vehicle where the revenue is in multiple rows.

    In AN2 then drag down:

    Case of displaying SUM at every row in AN column:

    =SUMIFS($AM$2:$AM$918,$E$2:$E$918,$E2,$F$2:$F$918,$F2)

    Case of displaying SUM only at last combination of Job Date and FleetNum in AN column:

    =IF(COUNTIFS($E3:$E$918,$E2,$F3:$F$918,$F2)=0,SUMIFS($AM$2:$AM$918,$E$2:$E$918,$E2,$F$2:$F$918,$F2),"")
    Quang PT

  3. #3
    Registered User
    Join Date
    08-24-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Excel for mac 2015
    Posts
    29

    Re: Totalling revenue each days for each vehicle where the revenue is in multiple rows.

    Hi bebo021999,

    Thanks for the reply.

    It doesn't seem to be working properly when i drag it down? It works for the initial vehicle and day but then it doesn't sum correctly and doesn't pick up every vehicle/day.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Totalling revenue each days for each vehicle where the revenue is in multiple rows.

    Try this modified version of beebo021999's formula.

    =IF(COUNTIFS($E3:$E8,$E2,$F3:$F8,$F2)=0,SUMIFS($AM$2:$AM8,$E$2:$E8,$E2,$F$2:$F8,$F2),"")
    Dave

  5. #5
    Registered User
    Join Date
    08-24-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Excel for mac 2015
    Posts
    29

    Re: Totalling revenue each days for each vehicle where the revenue is in multiple rows.

    Hi FlameRetired,

    Thanks for the reply! Is there a way of adding another criteria? I just noticed some FleetNum are used twice in a day by two different OperID. Can it been summed dependant on all three? JobDate, FleetNum & OperID?

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Totalling revenue each days for each vehicle where the revenue is in multiple rows.

    Duplicated post w/ errors.
    Last edited by FlameRetired; 11-18-2015 at 02:25 AM.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Totalling revenue each days for each vehicle where the revenue is in multiple rows.

    This adds the OperID.

    =IF($AL2="YES",SUMIFS($AM$2:$AM2,$E$2:$E2,$E2,$F$2:$F2,$F2,$K$2:$K2,$K2),"")

    The last formula had the cell ranges wrong. This one returns values in every cell where AL is YES. With the IF(COUNTIFS everything returned blank.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Totalling revenue each days for each vehicle where the revenue is in multiple rows.

    Aha! You only want the totals to show at the last entry of FleetNum for each day. Try this.

    =IF(AND($AL2="YES",COUNTIFS($F$2:$F2,$F2,$E$2:$E2,$E2)=COUNTIFS($F$2:$F$918,$F2,$E$2:$E$918,$E2)),SUMIFS($AM$2:$AM2,$E$2:$E2,$E2,$F$2:$F2,$F2,$K$2:$K2,$K2),"")

    Edit Mental errors. See if this latest got it right. I need to get some sleep.
    Last edited by FlameRetired; 11-18-2015 at 02:43 AM.

+ 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. Revenue Calculation based on Variable revenue Percentage
    By suhabthan in forum Excel General
    Replies: 0
    Last Post: 06-19-2014, 12:48 PM
  2. Excel Formula Showing Revenue Recognition Based on Days and Months
    By stratcat3345 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-16-2014, 06:13 AM
  3. Revenue recognition and deffered revenue
    By saurabhwise in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-08-2013, 11:12 AM
  4. Ranking multiple markets based on estimated revenue
    By djreddy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-20-2013, 09:24 AM
  5. [SOLVED] Difference between total revenue - last days revenue
    By vinodt in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-08-2012, 02:35 PM
  6. Excel 2007 : How to consolidate same days and total revenue?
    By techboy2011 in forum Excel General
    Replies: 5
    Last Post: 04-12-2011, 03:30 AM
  7. Formula that will divide # of days left in month by my revenue goal
    By eth1129 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-12-2009, 05:53 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