+ Reply to Thread
Results 1 to 2 of 2

Thread: statement rewrite

  1. #1
    Registered User
    Join Date
    06-25-2009
    Location
    Canada, Victoria
    MS-Off Ver
    Excel 2003
    Posts
    6

    statement rewrite

    Is there a way to shorten this statement:

    =IF(Q7="Beauchamp, Suzanne",(Availability!$G$8),IF(Q7="Gamble, Katherine",(Availability!$G$11),IF(Q7="Jacek, Ian",(Availability!$G$15),IF(Q7="Maxwell, Ashley ",(Availability!$G$18),IF(Q7="Mead, Chloe",(Availability!$G$21),IF(Q7="Michie, Carolyn",(Availability!$G$24),IF(Q7="Park, Melody",(Availability!$G$27),IF(Q7="Philip, Troy",(Availability!$G$30),""))))))))&IF(Q7="Rodriguez, Anastasia",(Availability!$G$33),IF(Q7="Russell, Kade",(Availability!$G$36),IF(Q7="Scinocca, Michael",(Availability!$G$39),IF(Q7="Su, Raymond",(Availability!$G$42),IF(Q7="Tavares, Andrew",(Availability!$G$45),IF(Q7="Turner, Sydney",(Availability!$G$48),IF(Q7="Vaal-Henke, Adam",(Availability!$G$51),IF(Q7="Watts, Alannah",(Availability!$G$54),""))))))))&IF(Q7="Woo, Janice",(Availability!$G$57),IF(Q7="Young, Maura",(Availability!$G$60),""))

    Thanks for the help

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,224

    Re: statement rewrite

    Do those names appear on the Availability sheet in the same rows as the values you are grabbing? For instance, is Beauchamp, Suzanne on row 8?

    If so, then this gets really easy. Let's say those names are ALL on that sheet in column A. Then a standard VLOOKUP can do it easily:

    =VLOOKUP(Q7, Availability!$A:$G, 7, 0)

    To keep your "null" response if the name isn't there, you'll have to check it first:

    =IF(ISNUMBER(MATCH(Q7, Availability!$A:$A, 0)), VLOOKUP(Q7, Availability!$A:$G, 7, 0), "")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

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