1. #1
    Graham@Buyagift is an unknown quantity at this point Super Member
    Join Date
    Apr 2004
    Location
    London
    Posts
    1,010
    Thanks
    22
    Thanked 33 Times in 19 Posts

    Excel help

    Hi,

    I hope somebody can help...

    I'm trying to lookup a value in another file, and return the 16th column. I then want to say if the result is x or y return 1 if not return 2.

    =IF((VLOOKUP($I2,'[afile.xls]Sheet1'!$A$8:$Q$1000,16,FALSE)=OR("X","Y")),"1","2 ")

    If I take the or statement out I can get it to work, so I think I'm nealy there...

    Any help greatly appreicated!

    Graham
    Buyagift.co.uk - over 2000 gift ideas | 10-12% on Affiliate Window |
    email: graham@buyagift.co.uk | msn: grahamatbuyagift@hotmail.com | Twitter: http://www.twitter.com/buyagiftaffs

  2. #2
    ianm is an unknown quantity at this point Avoiding real work
    Join Date
    Aug 2003
    Location
    Buckinghamshire
    Posts
    1,381
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The OR function needs to have the full comparison in it, so it would need to be -

    =IF(OR(VLOOKUP($I2,'[afile.xls]Sheet1'!$A$8:$Q$1000,16,FALSE)="X",VLOOKUP($I2,'[afile.xls]Sheet1'!$A$8:$Q$1000,16,FALSE)="Y"),"1","2")

    Think that should work
    Those who can do, those who can't talk about it

  3. #3
    Graham@Buyagift is an unknown quantity at this point Super Member
    Join Date
    Apr 2004
    Location
    London
    Posts
    1,010
    Thanks
    22
    Thanked 33 Times in 19 Posts
    Thanks for your help Ian,

    that certainly does the trick!

    Graham
    Buyagift.co.uk - over 2000 gift ideas | 10-12% on Affiliate Window |
    email: graham@buyagift.co.uk | msn: grahamatbuyagift@hotmail.com | Twitter: http://www.twitter.com/buyagiftaffs

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

Content Relevant URLs by vBSEO 3.5.0 RC2