+ Reply to Thread
Results 1 to 11 of 11

Not more than 100%

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Not more than 100%

    Hello,
    Looking for a way to prevent a formula to have an answer with more than 100%. I tried using data validation but it seem to allow it

    A1 = 2
    A2 = 1
    A3 = Formula A1/A2

    Looking for way to kick an error out when the numerator is larger than the denominator .

    Thanks!
    Last edited by PunkDaddy; 01-04-2013 at 04:16 AM. Reason: Fix verbage

  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,464

    Re: Not more than 100%

    =IF(A1>A2,1,A1/A2)


    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
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Not more than 100%

    Hi,

    how about something like this:
    =IF(A1>A2,"over 100%",A1/A2)

    edit: ok, looks like I misunderstood.
    Last edited by RHCPgergo; 01-04-2013 at 04:20 AM. Reason: oh

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Not more than 100%

    Also =MIN(A1/A2,1)

  5. #5
    Registered User
    Join Date
    01-04-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Not more than 100%

    Will it make any difference if I am doing this within a table

    for example

    =IF(Table4[[#This Row],['# of 1''s]]>Table4[[#This Row],[Amt. Audit]],over 100%,Table4[[#This Row],['# of 1''s]]/Table4[[#This Row],[Amt. Audit]])

    Or

    =IF(Table4[[#This Row],['# of 1''s]]>Table4[[#This Row],[Amt. Audit]],1,Table4[[#This Row],['# of 1''s]]/Table4[[#This Row],[Amt. Audit]])

  6. #6
    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,464

    Re: Not more than 100%

    No, I don't think so, but the "over 100%" needs to be in quotes.


    Regards, TMS

  7. #7
    Registered User
    Join Date
    01-04-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Not more than 100%

    It is kicking an error in the formula each time.

    =IF(Table4[[#This Row],['# of 1''s]]>Table4[[#This Row],[Amt. Audit]],"over 100%",Table4[[#This Row],['# of 1''s]]/Table4[[#This Row],[Amt. Audit]])

    or

    =IF(Table4[[#This Row],['# of 1''s]]>Table4[[#This Row],[Amt. Audit]],1,Table4[[#This Row],['# of 1''s]]/Table4[[#This Row],[Amt. Audit]])

  8. #8
    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,464

    Re: Not more than 100%

    Please post a sample workbook.

    Regards, TMS

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Not more than 100%

    And which error?

  10. #10
    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,464

    Re: Not more than 100%

    @RHPCgergo: re edit - not necessarily, given the more recent examples.

  11. #11
    Registered User
    Join Date
    01-04-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Not more than 100%

    Here is the example, thanks so much everyone!

    Name # of 1's Amt. Audit % of 1's
    Name1 1 2 50.00%
    Name2 5 15 33.33%
    Name3 15 16 93.75%

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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