+ Reply to Thread
Results 1 to 3 of 3

Advanced IF-THEN... Help Please

  1. #1
    Registered User
    Join Date
    09-19-2006
    Posts
    2

    Advanced IF-THEN... Help Please

    I've always wanted to do this, and I have a real need now so hopefully someone can help. I need a macro that looks at a column for a single ID, and then if it finds it returns the value of another column in the same row that ID resides in. The basic premise is as follows:

    If Column A1:A6 = 4 then Row = X, get value Column C, Row X

    A|B|C
    -------
    0|6|2
    1|7|3
    2|8|4
    3|9|5
    4|0|6
    5|1|7

    So the returned value wanted would be "6" in this example. Based on the row having a value of "5"

    Im pretty sure this is doable, just unsure how to make it happen

    Any help is much appreciated... I did try to search for this, but I'm a bit at a loss what specifically to look for

    Thanks in advance!!

  2. #2
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    You could use a VLookup formula, so if D1 was 4 as per your example

    =VLOOKUP($D$1,$A:$C,3,0)

    in any cell would return the 6.


    Col
    If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

  3. #3
    Registered User
    Join Date
    09-19-2006
    Posts
    2
    Thanks! I went with:

    =VLOOKUP(A3,'SHEETNAME'!A:C,3,0)

    Worked like a charm... seems I was making it more difficult than needed!

    Thanks again.

+ 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