Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: Using IF formula

  1. #1
    New Member Blackspear's Avatar
    Join Date
    Apr 2002
    Location
    Gold Coast, Queensland, Australia
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    =IF(J3=0,"",J3/H3)

    What if cell H3 and/or J3 is zero, what formula do I need to stop #Div/0! and #value ???

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    =IF(AND(J3<>0,H3<>0),J3/H3,"")



    If J3 does not = 0 and
    H3 does not = 0 then J3/H3

    Else ""



    Tom

  3. #3
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,647
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    6 Thread(s)

    Default

    On 2002-04-27 22:45, Blackspear wrote:
    =IF(J3=0,"",J3/H3)

    What if cell H3 and/or J3 is zero, what formula do I need to stop #Div/0! and #value ???
    =IF(H3,J3/H3,"")

  4. #4
    New Member Blackspear's Avatar
    Join Date
    Apr 2002
    Location
    Gold Coast, Queensland, Australia
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Many thanks Tom One more for you, a simple one I have 100 and the cell next to it I need 5% of 100

    Cheers

    Craig.

  5. #5
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,647
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    6 Thread(s)

    Default

    I have 100 and the cell next to it I need 5% of 100

    =A1*5%

    where A1 has either a number or empty.

  6. #6
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,647
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    6 Thread(s)

    Default

    On 2002-04-27 23:09, Aladin Akyurek wrote:
    On 2002-04-27 22:45, Blackspear wrote:
    =IF(J3=0,"",J3/H3)

    What if cell H3 and/or J3 is zero, what formula do I need to stop #Div/0! and #value ???
    =IF(H3,J3/H3,"")
    By the way, you get a #VALUE! error only if H3 and/or J3 contains a text value like "abc".

    The above formula will suffice when it's guaranteed that these cells will not have such text values while either one or both can be truly empty.

  7. #7
    New Member Blackspear's Avatar
    Join Date
    Apr 2002
    Location
    Gold Coast, Queensland, Australia
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Aladin, thank you so much, been a great help, easy to do on a calculator, not so easy in excel with formula's

    Craig.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •