+ Reply to Thread
Results 1 to 7 of 7

Calculating 0% in a HLOOKUP function

  1. #1
    Registered User
    Join Date
    06-16-2012
    Location
    Valdosta, GA, USA
    MS-Off Ver
    Excel 2010
    Posts
    18

    Post Calculating 0% in a HLOOKUP function

    I am trying to calculate discounts based on the dollar value of purchases. I have created an HLOOKUP formula to calculate the price with the discount the discount. It all works well except the 0% discount returns a 0.00 value instead of the value of the cell originally referenced. I know there has to be a relatively simple fix for this, but I have not been able to figure it out. Please help.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,437

    Re: Calculating 0% in a HLOOKUP function

    Well what would be helpful is for you to tell us what the formula is. And even better if you did that in the context of a sample workbook.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Calculating 0% in a HLOOKUP function

    care to share your formula?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    06-16-2012
    Location
    Valdosta, GA, USA
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Calculating 0% in a HLOOKUP function

    Thanks for the quick response y'all.

    The formula I am using is: =G3*HLOOKUP(J3,Rate,2,FALSE). G3 has a value of 1555. J3 is the cell this value is being placed in.

    The Rate table is below:

    AA X Y Z
    0% 25% 50% 65%


    The above formula figures the X,Y, and Z values correctly, but the AA comes out as 0.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Calculating 0% in a HLOOKUP function

    change aa rate to 1 or 100% then when its aa g3*1=g3
    or since its a discount
    =G3-G3*HLOOKUP(J3,Rate,2,FALSE) Will give the new price
    Last edited by martindwilson; 06-16-2012 at 08:25 PM.

  6. #6
    Registered User
    Join Date
    06-16-2012
    Location
    Valdosta, GA, USA
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Calculating 0% in a HLOOKUP function

    Thanks, Guru. That solved the problem.

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Calculating 0% in a HLOOKUP function

    This thread is in the wrong forum!
    Ben Van Johnson

+ 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