+ Reply to Thread
Results 1 to 6 of 6

Updating a cell based on another cells value

  1. #1
    Registered User
    Join Date
    01-18-2012
    Location
    meniha nre
    MS-Off Ver
    Excel 2003
    Posts
    9

    Question Updating a cell based on another cells value

    Hi folks,

    New job forcing me to use excel and under some stress hence my first post - please excuse my ignorance!

    I have two worksheets with over 1000 rows:
    Worksheet 1: Has 1000 values in Column A and 1000 corresponding values in Column B.
    Worksheet 2: Has 400 with some of the same values found in Column A of worksheet 1 but no values in Column B

    I need to do:
    When the value in A1 (worksheet 2) = value in any cell in Column A (Worksheet 1)
    take the value in column B for that same row (Worksheet 1)
    and populate B1 (worksheet 2) with that same value

    Any help would be much appreciated.
    Thanks,
    Joe
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Updating a cell based on another cells value

    Try this in B2:
    Please Login or Register  to view this content.
    Copy downwards
    Quang PT

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Updating a cell based on another cells value

    Use VLOOKUP

    =VLOOKUP(A1,WS1!A:B,2,FALSE)

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Updating a cell based on another cells value

    Thanks for the rep

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Updating a cell based on another cells value

    @Moderator(s)/Admin: I got positive rep from the OP on this thread and it is marked Solved.

    However, I have received negative rep from Alex H, who has not been a contributor to the thread, with the comment, "Solution does not work".

    Please can one of you take issue with Alex H about forum etiquette and behaviour and, ideally, reverse the negative rep.

    Thanks, TMS

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,521

    Re: Updating a cell based on another cells value

    For clarification: Alex H has pointed out that my solution "did not work" in the sample workbook.

    It's a while now, but I suspect this was a generic response, possibly using my iPad, and I may not have tried to open the sample workbook.

    For completeness, the working solution would be:

    Cell B2 formula: =VLOOKUP(A2,Worksheet1!A:B,2,FALSE) ... copied down.

    To cater for missing values in Excel 2003 (from profile), it would be:

    =IF(ISNA(VLOOKUP(A2,Worksheet1!A:B,2,FALSE)),"",VLOOKUP(A2,Worksheet1!A:B,2,FALSE))

    And, to cater for missing entries in Excel 2007 and above (from sample file extension).

    These formulae would be equivalent to that provided by bebo021999 but using full column address ranges.

    Alex H has now balanced the rep.

    Regards, TMS

+ 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