+ Reply to Thread
Results 1 to 2 of 2

VBA code to add cells to a row based on values in current cells in the row

  1. #1
    Registered User
    Join Date
    01-27-2012
    Location
    Land
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question VBA code to add cells to a row based on values in current cells in the row

    I have an excel sheet e.g.

    name age
    jim 58
    mary 25
    john 23
    tan 45
    lee 22
    jane 35


    and another sheet with

    name gender
    jim m
    jane f
    lee m
    tan m


    I would like to combine them based on name to get


    name age gender
    jim 58 m
    mary 25
    john 23
    tan 45 m
    lee 22 m
    jane 35 f


    So the values which are missing in the second table should be left blank in the main table but if a value exists it should be added to the row. The values in the second table are not in the same order as in the first table.

    Thanks!

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: VBA code to add cells to a row based on values in current cells in the row

    I suggest you investigate the VLOOKUP formula. If you get stuck post a workbook.

+ 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