Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Shorten Formula (Excel 2002/2003)

    Hi

    Can this be a lilttle shorter please.

    =IF(ClassB_C="B",VLOOKUP(B7,bcminuk,7,0),IF(ClassB _C="C1",VLOOKUP(B7,bcminuk,9,0),IF(ClassB_C="C2",V LOOKUP(B7,bcminuk,9,0))))

    C1 and C2 lookup the same range I tried =IF(OR but could not get it right

    Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shorten Formula (Excel 2002/2003)

    You could use OR like this:

    =IF(ClassB_C="B",VLOOKUP(B7,bcminuk,7,0),IF(OR(Cla ssB_C="C1",ClassB_C="C2"),VLOOKUP(B7,bcminuk,9,0)) )

    or change the formula slightly:

    =VLOOKUP(B7,bcminuk,IF(ClassB_C="B",7,IF(OR(ClassB _C="C1",ClassB_C="C2"),9)),0)

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Shorten Formula (Excel 2002/2003)

    Hi Hans

    Many thanks for your prompt reply. I shall use your second suggestion.

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •