+ Reply to Thread
Results 1 to 6 of 6

Need formula to calculate margin based on type of lead source

  1. #1
    Registered User
    Join Date
    02-12-2016
    Location
    Denver, CO USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    3

    Need formula to calculate margin based on type of lead source

    I have a spreadsheet for tracking deals and margins. I want to get the average margin per type of lead source.

    I have one column, V, that lists the lead source type. There are three different text options used here. For simplicity sake I will say; ant, bat, car
    I have another column, P, that has the margin calculated from the deal using data in other cells from other columns.

    I am trying to create a formula for a separate cell that would figure, if column V is "ant" then include that particular row's P money value in the formula. Want to SUM all the P (say P2:P24) column values that are from "ant" lead source in column V and leave the others out, then divide that total by the overall deals from that lead source.

    I already have totals for the lead source to reference for dividing:
    In column V, already have this on row 25:
    =COUNTIF(V2:V24,"ant")
    which gives me my total deals from that lead type. These cell are V25, V26, V27 for the 3 different lead sources. So these are the reference for once I have the sum of all P values for one lead type, i can divide by these cells, and figure that should give me my total margin based only on that lead source.

    Please help advise me on the right formula to create for this. Appreciate any input.

  2. #2
    Forum Contributor
    Join Date
    04-09-2013
    Location
    Philippines, Manila
    MS-Off Ver
    Excel 2010
    Posts
    141

    Re: Need formula to calculate margin based on type of lead source

    Hi nick,

    Appreciate if you could upload a template.

    Tnx

  3. #3
    Registered User
    Join Date
    02-12-2016
    Location
    Denver, CO USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    3

    Re: Need formula to calculate margin based on type of lead source

    Thanks for the reply Jarvin, but I solved it myself with a bit more searching. SUMIF function is key.

    Here is what I used for that cell in case it helps anyone else out in the future:

    =SUMIF(V2:V24, "ant", P2:P24)

    SUMIF(range, criteria, [sum_range])

    worked just how I needed it to

  4. #4
    Registered User
    Join Date
    07-16-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Need formula to calculate margin based on type of lead source

    Attaching an example of a pivot table. Is this what you were looking for and would this work for you?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-12-2016
    Location
    Denver, CO USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    3

    Re: Need formula to calculate margin based on type of lead source

    Thanks Salamander, but I did get it figured out.

    One note I might add from my last post, I did need to include the division to the end as well, so it divides and gets an average instead of just a total sum.

    =SUMIF(V2:V24, "ant", P2:P24)/V25

    Which V25 was my reference for total per source type - COUNTIF mentioned in 1st post

  6. #6
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Need formula to calculate margin based on type of lead source

    Hi nickoli,

    You have the solution FWIW, if you want a single formula solution, try:
    =AVERAGEIF(V2:V24,"ant",P2:P24)

    Or this if you dont want to consider zeros:
    =AVERAGEIFS(P2:P24,P2:P24,">0",V2:V24,"ant")

    Blessing

+ 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. Calculate Retail Price based on desired profit margin
    By fergusga in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-12-2016, 10:59 AM
  2. Net Margin Formula Using SUM= To Calculate Gross Margin Cells
    By jezrp22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-26-2015, 08:41 PM
  3. [SOLVED] Formula to calculate supplier evaluation scores based on their profit margin %
    By The_Snook in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-09-2015, 06:03 PM
  4. Calculate lead time based on available working hours
    By Nu2Java in forum Excel General
    Replies: 6
    Last Post: 07-11-2014, 03:04 PM
  5. Need to have Excel calculate profit margin based on variable...stuck!
    By djbeatsent in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-09-2013, 11:21 AM
  6. Replies: 2
    Last Post: 01-09-2010, 04:06 AM
  7. Need Formula or Function to calculate Margin (reverse of Percent a
    By Ken in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2005, 06:06 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