+ Reply to Thread
Results 1 to 6 of 6

If and ANDIF statement

  1. #1
    Registered User
    Join Date
    05-08-2008
    Posts
    40

    If and ANDIF statement

    Hi,

    I hope I can explain this accurately enough, I'm calculating telephone call costs given certain call times and cost variables, and I need a formula that looks at the length of the call, the cost of the call, and then calculate if, given the capped call cost, its a capped fee or standard fee


    Column B = Length of call
    Column D = Cost of call ( which in this case = 0.09 per min

    Variables are, if the call cost is less than 15min, the MAX cost is 0.70 eg, 5 min call costs 0.45 (plus a connection cost of 0.06)12 min call costs 0.70 (inc Call Cost)

    So as a list of call examples, I want Excel to come up with the same results below.

    1Min = 0.15
    2Min = 0.24
    5Min = 0.51
    7Min = 0.69
    8Min= 0.70
    10Min = 0.70
    11Min = 0.70
    16Min = 0.79
    18Min = 0.97

    Overview
    Per Min cost = 0.09
    Call Cost is Capped at 0.70 for 1st 15 Mins
    Connection fee 0.06



    Many thanks in advance,
    Mike


    PS... Using Excel 2007
    Last edited by Mike_Dean; 05-08-2008 at 05:39 AM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If B1 has call length in time format, e.g. 5 minutes is 0:05 then use this formula for cost

    =MIN(0.7,B1*1440*0.09+0.06)+MAX(0,B1*1440-15)*0.09

    If B1 is just a number, e.g. 5 then change formula to

    =MIN(0.7,B1*0.09+0.06)+MAX(0,B1-15)*0.09

  3. #3
    Registered User
    Join Date
    05-08-2008
    Posts
    40
    Quote Originally Posted by daddylonglegs
    If B1 has call length in time format, e.g. 5 minutes is 0:05 then use this formula for cost

    =MIN(0.7,B1*1440*0.09+0.06)+MAX(0,B1*1440-15)*0.09

    If B1 is just a number, e.g. 5 then change formula to

    =MIN(0.7,B1*0.09+0.06)+MAX(0,B1-15)*0.09

    Perfect.. Thank you kindly... didn't think to use the MIN MAX scenario..


    Again,
    Thanks

  4. #4
    Registered User
    Join Date
    05-08-2008
    Posts
    40
    One more if I may..

    If C8 = L then return the value from $E$1,

    But if C8 = M, N, or O, then return either Mobile, National or Other


    This worked if I wanted to return a value, but if I want either a value or Text

    =IF(C8="L",$E$1)+IF(C8="N",$E$2*B8)+IF(C8="M",$E$3*B8)+IF(C8="S",$E$4)


    I had the text value of Mobile National and Other on cell E2, E3, and E4, but no go...

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  6. #6
    Registered User
    Join Date
    05-08-2008
    Posts
    40
    Quote Originally Posted by NBVC
    Try:

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.

    Thank you so very much, (apologies for the double post..!

    Mike

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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