+ Reply to Thread
Results 1 to 5 of 5

Please help a newbie with IF formula

  1. #1
    Registered User
    Join Date
    06-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Please help a newbie with IF formula

    Hi there, please excuse me as I'm newbie for excel formulas. I'm trying to create a mileage calculation chart.

    E12= Starting Odometer
    F12= Ending Odometer

    B12= "Home" or "Office"
    B7= Mile Value
    G12= Result value

    Basically I'm trying to accomplish F12-E12 and if B12 = Home, subtract B7.

    I have this but not sure where is wrong as Im editing an existing formula:
    =IF(OR(ISBLANK(E12),ISBLANK(F12),0,F12-E12,IF(B12="Home",-B7)))

    Thank you in advance for your help
    Hiroshi

  2. #2
    Valued Forum Contributor
    Join Date
    10-10-2012
    Location
    New York
    MS-Off Ver
    Excel 2007/2010
    Posts
    337

    Re: Please help a newbie with IF formula

    try this
    =IF(OR(ISBLANK(E12),ISBLANK(F12)),0,IF(B12="home",F12-E12-B7,F12-E12))
    Don't just use the answers provided for you. Try to understand how it works by reverse engineering or asking about it.

    Please mark the thread as [SOLVED] (Thread Tools->Mark thread as Solved) when answered.
    If you're happy with an answer given, please click the * under the person's name to boost their reputation.

  3. #3
    Registered User
    Join Date
    06-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    [solved] Re: Please help a newbie with IF formula

    Works perfect... you are a genius. Thank you so much for your quick response!!!!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16/365
    Posts
    52,242

    Re: Please help a newbie with IF formula

    hshimamura Im happy you had your question resolved

    or future reference, please give your threads a title that actually describes what your problem is, using words/terms that could be used in a search function

    Also, to mark a thread solved, use the thread tools above your 1st post, and select "mark as solved" (I will do it for you this time)

    Thanks
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    06-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Please help a newbie with IF formula

    Thanks FDibbins.... will do.

+ 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