+ Reply to Thread
Results 1 to 5 of 5

Thread: IF Function

  1. #1
    Registered User
    Join Date
    06-13-2009
    Location
    CANADA
    MS-Off Ver
    Excel 2008 MAC
    Posts
    13

    IF Function

    i am using the IF script, and i am also using the COUNT script in the logical part of the IF statement.

    i need to make sure that both K3 and V3 have a value inside of the cell in order for the statement to work, although when just K3 has a value, the IF - TRUE statement works anyway. any ideas on how to fix this?

    =IF(COUNT(K3,V3),SUM(K3+V3),"")
    Last edited by o AXE; 06-14-2009 at 01:19 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-27-2008
    Posts
    753

    re: IF Function

    Hi
    =IF(AND(K3>0, V3>0),SUM(K3,V3),"")
    Ravi

  3. #3
    Forum Moderator ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2003 & 2010
    Posts
    1,797

    re: IF Function

    Hi o AXE,

    How about this:

    Code:
    =IF(AND(ISNUMBER(K3),ISNUMBER(V3)),SUM(K3+V3),"")
    Cheers,
    Docendo discimus.

    Please consider:
    • Thanking those who helped you. Click the reputation icon in the contributor's post and add Reputation.
    • Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  4. #4
    Registered User
    Join Date
    06-13-2009
    Location
    CANADA
    MS-Off Ver
    Excel 2008 MAC
    Posts
    13

    re: IF Function

    Quote Originally Posted by ConneXionLost View Post
    Hi o AXE,

    How about this:

    Code:
    =IF(AND(ISNUMBER(K3),ISNUMBER(V3)),SUM(K3+V3),"")
    Cheers,
    thanks a lot for the replies. they both worked but this one only kept the one row. thanks!

  5. #5
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,447

    Re: IF Function

    ConnexionLost, please only use Code Tags for VBA code, not formulas.

    Moving this post to the correct Forum
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

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.2.0