+ Reply to Thread
Results 1 to 4 of 4

doing some lookup/index in a checksum function

  1. #1
    Registered User
    Join Date
    12-01-2003
    Posts
    6

    doing some lookup/index in a checksum function

    hi, i have a worksheet called 'data', where there are several columns, the only relevant ones being:
    -- A: names
    -- E, F and G: numbers

    E, F and G are connected such that E must equal F+G (it's actually more complicated than that, but i'm trying to simplify it here)

    I need to create a worksheet, called 'test', to ensure that, for whichever A i'm checking, E=F+G.

    In 'test', I put a name in A1. I'd like to create an IF function in C1 to search data!A1 to data!A50 for the name that matches test!A1, and return 'Correct' or 'Wrong' depending on whether the respective E=F+G.

    For example, if test!A1="bob" and data!A28="bob", I'd like test!C1 to return "Wrong" if data!E28 is not equal to data!F28+data!G28.

    Problem is, I don't know how to put that all into a function. Any help?

    - Kenneth

  2. #2
    Registered User
    Join Date
    01-20-2005
    Posts
    21
    Try this:

    =IF((VLOOKUP(A1,Data!A1:D4,2,FALSE)+VLOOKUP(A1,Data!A1:D4,3,FALSE))=VLOOKUP(A1,Data!A1:D4,4,FALSE),"Correct","Wrong")

  3. #3
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    Try this:
    =IF(SUMPRODUCT((A:A="Name")*(E:E=F:F+G:G)),"Correct","Wrong")

    Ola Sandstrom


    Note: I just examplified the principle. Fill in your sheetnames and ranges.

  4. #4
    Registered User
    Join Date
    12-01-2003
    Posts
    6
    thanks franky! works great!

+ 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.6.0 RC 1