Consulting

Results 1 to 10 of 10

Thread: Solved: if & vlookup

  1. #1

    Solved: if & vlookup

    =IF(ISERROR(VLOOKUP(Question_1,Points_Q1,2,FALSE)),"Error",VLOOKUP(Question_1,Points_Q1,2,FALSE))
    i now need this code to look at range Question_4 and if this equals "Expection" then

    =IF(ISERROR(VLOOKUP(Question_1,Points_Q1,3,FALSE)),"Error",VLOOKUP(Question_1,Points_Q1,3,FALSE))
    other wise

    =IF(ISERROR(VLOOKUP(Question_1,Points_Q1,2,FALSE)),"Error",VLOOKUP(Question_1,Points_Q1,2,FALSE))
    Can anyone help?

  2. #2

    Is this possible

    if this helps this is the code I am trying to replace but the criteria above
     
                    .FormulaR1C1 = _
                        "=IF(OR(ISNA(MATCH(RC26,Ltable!R17C6:R22C6,0)),AND(RC21<>1,RC21<>2)),0,VLOOKUP(RC26,Ltable!R17C6:R22C8,IF(RC21=1,2,3),0))"

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,264
    Location
    =IF(NOT(ISNA(vlookup1)),vlookup1,IF(NOT(ISNA(vlookup2)),vlookup2,...
    ____________________________________________
    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

  4. #4

    further help required

    Sorry for late reply xld .. Been really ill. I don't understand your response can uclarify?

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,264
    Location
    I was just giving you the syntax of how to do it, you would need to embed your formulae in the appropriate points.
    ____________________________________________
    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

  6. #6
    thanks for the syntaxbutim stillhaving major issues with this what imn trying to acchieve is below
    if question_4 is equal to "exception"
    [VBA]
    then
    =IF(ISERROR(VLOOKUP(Question_1,Points_Q1,3,FALSE)),"Error",VLOOKUP(Question _1,Points_Q1,3,FALSE))
    [/VBA]

    other wise




    Code:


    [VBA]=IF(ISERROR(VLOOKUP(Question_1,Points_Q1,2,FALSE)),"Error",VLOOKUP(Question _1,Points_Q1,2,FALSE))[/VBA]
    Last edited by khalid79m; 12-14-2008 at 01:14 PM.

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,264
    Location
    In VBA, embedded quotes need to be doubled up.
    ____________________________________________
    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

  8. #8
    =IF(Question_4="Exception",VLOOKUP(Question_1,Points_Q1,3),VLOOKUP(Question_1,Points_Q1,2))
    I have managed to createthis worksheet formula but the vlookup doesnt seem to work right

  9. #9

    is this whatyoumean

    =IF(Question_4="Exception",IF(ISERROR(VLOOKUP(Question_1,Points_Q1,3,FALSE)),"error",VLOOKUP(Question_1,Points_Q1,3,FALSE)),IF(ISERROR(VLOOKUP(Question_1,Points_Q1,2,FALSE)),"error",VLOOKUP(Question_1,Points_Q1,2,FALSE)))
    this seems to work? can this be improved?

  10. #10

    the vbaq code for anyonee reading this post inthe future, like xld said double up

    .FormulaR1C1 = "=IF(Question_4=""Exception "",IF(ISERROR(VLOOKUP(Question_1,Points_Q1,3,FALSE)),""Error"",VLOOKUP(Question_1,Points_Q1,3,FALSE)),IF(ISERROR(VLOOKUP(Question_1,Points_Q1,2,FALSE)),""Error"",VLOOKUP(Question_1,Points_Q1,2,FALSE)))"


    is this right xld?

Posting Permissions

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