+ Reply to Thread
Results 1 to 12 of 12

Change data based on specific column?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-09-2004
    Posts
    6
    I've been trying to implement a VLOOKUP table on my sheet, but I don't get the hang of them.

    What would my "=VLOOKUP..." statement look like for the following simple example? Remember, I want variables t and s to indicate data from Day 1 or Day 2 when variable X is changed to a 1 or a 2.

    Col A      Col B   Col C   Col D    Col E
                               Day No.  X
    Day no.     1       2    | Today
    Bench P    100     110   |  t
    Leg P      200     210   |  s

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by deesh123
    I've been trying to implement a VLOOKUP table on my sheet, but I don't get the hang of them.

    What would my "=VLOOKUP..." statement look like for the following simple example? Remember, I want variables t and s to indicate data from Day 1 or Day 2 when variable X is changed to a 1 or a 2.

    Col A      Col B   Col C   Col D    Col E
                               Day No.  X
    Day no.     1       2    | Today
    Bench P    100     110   |  t
    Leg P      200     210   |  s
    It would look like

    =Vlookup(cell-containing-item,table-range,cell-containing-x,False)

    like
    =Vlookup("Bench P",A3:C4,E1,False)
    =Vlookup("Leg P",A3:C4,E1,False)

    (note, cell-containing-item would be the 'Bench p' or 'Leg p" that you were currently dealing with, Table Range would be the table that included the 'Bench p' etc descriptions and the next 'two' columns (for days 1 & 2).)

    The VLookup was pointed to the format of the formula

    =IF(U1=1,G3, IF(U1=2,H3), IF(U1=3,I3) IF(U1=4,J3) IF(U1=5,K3) IF(U1=6,L3) IF(U1=7,m3) IF(U1=8,N3) IF(U1=9,o3) IF(U1=10,p3) IF(U1=11,q3) IF(U1=12,R3))

    rather than the two-possibility Day 1 Day 2, however a further look at that proposed formula would suggest that the Offset would work, thus

    =Offset(G3,0,U1-1)

    will point you to cells G3, H3, I3, J3 etc depending upon the contents of cell U1.

    ---
    Last edited by Bryan Hessey; 10-08-2006 at 11:57 PM.

+ 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