+ Reply to Thread
Results 1 to 6 of 6

Change in another cell with respect to the value in active cell

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    112

    Change in another cell with respect to the value in active cell

    Hello Experts,

    I have different status in the range for eg: A,B,C,D,E,F

    Let say if the status is "A" in the range "B2", then a numeric value "1" should be added in corresponding row range "F2"

    Similarly if the status is changed to "B" then numeric value should be "2"

    Can anybody help me out a code for this?

    Thanks in Advance.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Change in another cell with respect to the value in active cell

    Hi sivdin,

    Try this:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Change in another cell with respect to the value in active cell

    taking into account that LOOKUP returns the closest match, you'd get a 6 for any letter higher up the alphabet than "F", you may want to try VLOOKUP instead, with a test for a match first.

    =IF(ISNA(MATCH(B2,{"A","B","C","D","E","F"},0)),"no match",VLOOKUP(B2,{"A",1;"B",2;"C",3;"D",4;"E",5;"F",6},2,FALSE))
    Last edited by teylyn; 01-20-2010 at 03:50 AM.

  4. #4
    Forum Contributor
    Join Date
    04-21-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: Change in another cell with respect to the value in active cell

    Experts,
    Please find the sample attached.
    Range "A" denotes the status and range "D" has the desired values corresponding to the status

    Whenever i change the status in the the correcponding value should change.

    Hope the data is clear for you..
    Attached Files Attached Files

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Change in another cell with respect to the value in active cell

    OK, If you enter a letter in G1 and want H1 to show the appropriate status, use

    =IF(ISNA(MATCH(G1,$A$2:$A$8,0)),"no match",VLOOKUP(G1,$A$2:$D$8,4,FALSE))

    hth

  6. #6
    Forum Contributor
    Join Date
    04-21-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: Change in another cell with respect to the value in active cell

    Thats Cool.. Its working.
    Thanks a lot for the solution.
    This Forum always rocks.........

+ 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