Consulting

Results 1 to 3 of 3

Thread: Solved: If Or Statements with VLookup

  1. #1
    VBAX Regular CloudenL's Avatar
    Joined
    Aug 2011
    Location
    Philadelphia
    Posts
    33
    Location

    Solved: If Or Statements with VLookup

    Is there any reason that after my second if(or(Vlookup, it doesnt find the right value?

    IF('Input Page'!$G$37<=49,(VLOOKUP(B15,'Rebate Matrix'!$B$4:$K$21,3,FALSE)),IF(OR('Input Page'!$G$37>=50,'Input Page'!$G$37<=99),(VLOOKUP(B15,'Rebate Matrix'!$B$4:$K$21,4,FALSE)),IF(OR('Input Page'!$G$37>=100,'Input Page'!$G$37<=249),(VLOOKUP(B15,'Rebate Matrix'!$B$4:$K$21,5,FALSE)),

    I have 8 if(or(lookups) in total. but it wont find the values if i go higher than 99.

    do i need to do the ones with the Or statement first, then the first one last since it is only looking for a less than number?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    OR should be AND, but you could just use

    IF('Input Page'!$G$37<=99,
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular CloudenL's Avatar
    Joined
    Aug 2011
    Location
    Philadelphia
    Posts
    33
    Location
    Thank You, the AND fixed it. i thought because i was looking for a greater than and a less than it should be an OR statement.

Posting Permissions

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