+ Reply to Thread
Results 1 to 6 of 6

IF statements with AND and OR

  1. #1
    Registered User
    Join Date
    12-28-2007
    Location
    Walnut Creek, CA
    MS-Off Ver
    2003 and 2007
    Posts
    18

    IF statements with AND and OR

    Hey all-

    Usually I can figure these out on my own, but Im definitely stumped this time around. Any help would be appreciated. Here's the formula I have so far, and I'm sure I'm just missing a comma or paranthesis somewhere.


    =IF(AND((B108>0),(F108>0)),IF((C109="Color Charge"),SUM(F108:H108,F109)),IF((C110="Color Charge"),SUM(F108:H108,F110),IF((C111="Color Charge"),SUM(F108:H108,F111),SUM(F108:H108))," ")

    The AND part is is basis to make sure that I there is actually an amount to pull, so I got that part down, but some of the ads that have an amount have a color charge and that needs to be added to the amount, BUT stupid way our statements come out sometimes put the line right underneath the ad, or a line or two down. Hope people are still following this, so I added a few IF statements to check to see if the cell a line or two or three down had that description and if it does to ad the appropriate cell. If I need to add the spreadsheet, I will draft one up quickly. Let me know please! Thanks in advance!


    <edit> A note to add, if the AND part does not complete both logics, then at the end of the statement I have the " ") as for a blank, because no amount is needed then. I think I gave about all I need. Let me know!

    <edit> Last edit, scratch the OR, no need for it in this formula.
    Last edited by ReFFi; 03-14-2008 at 01:36 PM.

  2. #2
    Registered User
    Join Date
    12-28-2007
    Location
    Walnut Creek, CA
    MS-Off Ver
    2003 and 2007
    Posts
    18
    Ok, it appears I figured it out, there are other things I want to add, but I think excel 2002 can only handle what, up to 7 nested IF statements? Correct me if I'm wrong.


    =IF(AND((B168>0),(F168>0)),IF((C169="Color Charge"),SUM(F168:H168,F169),IF((C170="Color Charge"),SUM(F168:H168,F170),IF((C171="Color Charge"),SUM(F168:H168,F171),SUM(F168:H168))))," ")

    The corrected formula.

  3. #3
    Registered User
    Join Date
    12-28-2007
    Location
    Walnut Creek, CA
    MS-Off Ver
    2003 and 2007
    Posts
    18
    Ok one last thing, and then I'll stop being a nuissance!

    I am attaching a sample of three lines, I got my original problem solved, but I think I have started to confuse myself.

    I need to add two more Logics to the whole process and I'm not sure excel can be capable of this.

    If it happens to be that B3 is the amount where everything is being summed and the description (C2 = (Credit or Debit)% (percent being a wild card), then add my highlighted column G2 to B3.

    Hope this makes sense.
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    How about?

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    12-28-2007
    Location
    Walnut Creek, CA
    MS-Off Ver
    2003 and 2007
    Posts
    18
    Quote Originally Posted by NBVC
    How about?

    Please Login or Register  to view this content.
    Didn't appear to work NBVC, I did figure out what I was doing wrong, however, in my latest post, I attached a sample of what I'm doing, and the couple of things I have to do from here on out.

    Thank you for the feedback however!

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Unless you don't have more If's, Then you could try in I2:

    Please Login or Register  to view this content.
    Are you sure you mean b3 in the previous post?
    Last edited by NBVC; 03-14-2008 at 02:54 PM.

+ 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