+ Reply to Thread
Results 1 to 7 of 7

Help with formula

  1. #1
    Registered User
    Join Date
    06-21-2008
    Posts
    6

    Help with formula

    I have a list of values on sheet 2 as follows; A2=X, A3=Y, A4=Z. B2=1, B3=4, B4=7. C2=2, C3=5, C4=8. D2=3, D3=6, D4=9. Can a formula be written so that if the letter X,Y or Z is entered in any random cell of column A in sheet 1that columns B,C and D will automaticly display the corrisponding information? Example; I would type Y in any cell in column A in sheet 1 and column B,C and D would display 4,5 and 6.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483
    Checkout Vlookup
    http://www.freewebs.com/davesexcel/V...20Example2.xls

  3. #3
    Registered User
    Join Date
    06-21-2008
    Posts
    2
    This can be done with vlookup formulas. Column B,C,D requires a formula in sheet 1.

    They need to look like this: Column A is the into, start at A2 and in:

    B2: =VLOOKUP($A2,Sheet2!$A$2:$D$4,2,FALSE)
    C2: =VLOOKUP($A2,Sheet2!$A$2:$D$4,3,FALSE)
    D2: =VLOOKUP($A2,Sheet2!$A$2:$D$4,4,FALSE)

    Paste this down column B to D for as many as you need in A.

    Good luck.

    Gerhard

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Put this formula in sheet1 B1 and copy across to D1 and down as far as required

    =IF(COUNTIF(Sheet2!$A$2:$A$4,$A1),INDEX(Sheet2!B$2:B$4,MATCH($A1,Sheet2!$A$2:$A$4,0)),"")

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Jack, please read the Forum Rules about thread titles before starting your next thread.

  6. #6
    Registered User
    Join Date
    06-21-2008
    Posts
    6
    Thanks. I used the advice of daddylonglegs and it worked. I will do a better job naming my next post.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Thank you, Jack, I appreciate your attitude.

+ 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