+ Reply to Thread
Results 1 to 5 of 5

If and or condition what am I missing

  1. #1
    Registered User
    Join Date
    02-03-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    3

    If and or condition what am I missing

    I am a VFP programmer trying to work some VBA but dont have it yet. Excel 2003 if and or conditions

    Please Login or Register  to view this content.
    Mike
    Attached Files Attached Files
    Last edited by miketrrap; 02-03-2009 at 06:39 PM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: If and or condition what am I missing

    Thanks for taking the time to read and comply with the rule .

    Looks ok. What's the problem.

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    02-03-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: If and or condition what am I missing

    I have posted the file book1
    I am getting A's where I should have B's
    If I switch the 2 or conditions from "SL-1" to "SL-2" and so on
    I get B's where I should have A's
    I must have the "or" condition not nested properly?
    Mike

  4. #4
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: If and or condition what am I missing

    I don't see where it's returning anything incorrectly...

    Your code says :

    If AD&D is in column Z, and SL-1 or SL-2 are in AA then AB = B

    If column Z is blank and column AA <> "" then AB = A
    Last edited by mewingkitty; 02-03-2009 at 06:46 PM.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  5. #5
    Registered User
    Join Date
    02-03-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: If and or condition what am I missing

    I bet its right in front of me but if z has AD&D and AA has a value I am looking for a B in column AB
    if coulumn z is blank (No AD&D) but AA has a value I need a A in column AB
    If both z and AA are blank I want a blank in AB.
    If I run the code I get a few B's where I should have A's in AB
    Hope I explained it correctly
    Mike

+ 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