+ Reply to Thread
Results 1 to 4 of 4

How can I write a formula to do this calculation?

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    WV
    Posts
    70

    How can I write a formula to do this calculation?

    what would the correct syntax for a single formula that can do the following calculation?

    =SUM(A1-B1)*0.01 IF C1 equals 2%

    =SUM(A1-B1)*0.015 IF C1 equals 1%

    Thanks

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: How can I write a formula to do this calculation?

    =if( c1 = 0.02 , (a1-b1) * 0.01, if ( c1 = 0.01, (a1-b1) * 0.015, "other value in c1"))
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: How can I write a formula to do this calculation?

    =if(c1=0.01,0.015,if(c1=0.02,0.01,0))*(a1-b1)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Registered User
    Join Date
    07-22-2008
    Location
    WV
    Posts
    70

    Re: How can I write a formula to do this calculation?

    Thanks, both of these solutions have worked.

+ 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. Write a general code that interpretes ser define formulas and implement calculation in vba
    By ingolf_ingolfsen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2017, 10:49 AM
  2. How to be able to write input or output in cells and get a calculation
    By bibbebabbe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2016, 04:04 AM
  3. Replies: 1
    Last Post: 04-02-2016, 04:32 AM
  4. How to write the Formula for calculation day of inventory when month has change
    By Akatecho in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-20-2014, 02:28 PM
  5. write data into another sheet after calculation
    By sanlen in forum Excel General
    Replies: 0
    Last Post: 02-09-2012, 02:31 AM
  6. Replies: 13
    Last Post: 01-24-2012, 09:38 AM
  7. [SOLVED] Need to know how to write a calculation...
    By Mary A Perez in forum Excel General
    Replies: 5
    Last Post: 05-30-2006, 04:40 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