+ Reply to Thread
Results 1 to 10 of 10

Formula that excludes cells if next column reads "away"

  1. #1
    Registered User
    Join Date
    10-12-2008
    Location
    Port Pirie
    Posts
    53

    Formula that excludes cells if next column reads "away"

    Hi guys!,
    Seems like a simple formula but has me stumped basicaly if a cell text equals "away" I want the formula to go to the next cell within the group and use that unless that is also displaying "away"
    Last edited by mr63249; 11-27-2008 at 01:19 AM.

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Formula Evaluation

    HI

    Excel always evaluates the conditions in order, so if the first condition is true it will always display irrespective of the validity of the second.

    If you try somethng like this
    Please Login or Register  to view this content.
    it should evaluate correctly.

    Regards

    Jeff

  3. #3
    Registered User
    Join Date
    10-12-2008
    Location
    Port Pirie
    Posts
    53
    Thankyou! now i just have to incorporate it with

    =IF(L6="Yasmina","Kendra",IF(L6="Kendra","Lauren",IF(L6="Lauren","Terence",IF(L6="Terence","Alycia",IF(L6="Alycia","Terence")))))
    Tried this;
    =IF(AND(B7="AWAY",B8="away"),A9,IF(B7="AWAY",A8,IF(L7="Yasmina","Kendra",IF(L7="Kendra","Lauren",IF(L7="Lauren","Terence",IF(L7="Terence","Alycia",IF(L7="Alycia","Terence")))))))

    But it doesnt ignore and move on to next person when i selected them away

  4. #4
    Registered User
    Join Date
    10-12-2008
    Location
    Port Pirie
    Posts
    53
    Would a DCOUNT formula be better? Not that I know how to use that either :D

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    If B3:B21 contain "away" (or not), then the first cell in A3:A21 next to a cell that isn't "away" is

    =index(A3:A21, match(true, B3:B21 <> "away", 0))

    This is an array formula, meaning it MUST be confirmed with Ctrl+Shift+Enter, not just Enter. (With the cursor in the formula bar, hold down Ctrl and Shift, then press Enter.) You'll know you did it correctly if curly braces appear around the formula in the Formula Bar; you cannot type in the braces directly.

    mr63249, please take a few minutes to read the Forum Rules about thread titles before starting your next thread.
    Last edited by shg; 11-23-2008 at 01:16 PM.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Formula evaluation

    Hi

    Given the number of variables involved it may probably be a better option to use VBA to determine the desired outcome.

    You could link the code to a button and it should probably be a lot more flexible too.

    If you would like to look at this let me know and I will see what I can do.

    regards

    Jeff

  7. #7
    Registered User
    Join Date
    10-12-2008
    Location
    Port Pirie
    Posts
    53
    Quote Originally Posted by solnajeff View Post
    Hi

    Given the number of variables involved it may probably be a better option to use VBA to determine the desired outcome.

    You could link the code to a button and it should probably be a lot more flexible too.

    If you would like to look at this let me know and I will see what I can do.

    regards

    Jeff
    Yeah If you dont mind, that would be great

  8. #8
    Registered User
    Join Date
    10-12-2008
    Location
    Port Pirie
    Posts
    53
    [QUOTE=shg;2001775]If B3:B21 contain "away" (or not), then the first cell in A3:A21 next to a cell that isn't "away" is

    =index(A3:A21, match(true, B3:B21 <> "away", 0))

    This is an array formula, meaning it MUST be confirmed with Ctrl+Shift+Enter, not just Enter. (With the cursor in the formula bar, hold down Ctrl and Shift, then press Enter.) You'll know you did it correctly if curly braces appear around the formula in the Formula Bar; you cannot type in the braces directly.

    Thanks I have tried that formula and It works, but I was wondering can I include special condiotions eg so if l6 =yasmina then l7 would equal "kendra" if not away then go down the list to the next person so the one person isnt named twice on the same day as is the current problem, and if kelly away then then it would go back to only the people in that group a5:a10
    Last edited by mr63249; 11-27-2008 at 01:19 AM.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    I can't tell exactly what you're trying to do ...

  10. #10
    Registered User
    Join Date
    10-12-2008
    Location
    Port Pirie
    Posts
    53
    Quote Originally Posted by shg View Post
    I can't tell exactly what you're trying to do ...
    Hopefully this attachment helps

    Basicaly Im creating a roster that will automaticaly change according to selections so if
    yasmina is away when it is her turn to work only the people selected in that group are able to do her shift
    Last edited by mr63249; 11-27-2008 at 01:19 AM.

+ 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