+ Reply to Thread
Results 1 to 4 of 4

Populate a column depending on the contents of other sheets.

  1. #1
    Registered User
    Join Date
    06-19-2013
    Location
    Peterborough, UK
    MS-Off Ver
    Excel 2010
    Posts
    37

    Red face Populate a column depending on the contents of other sheets.

    Hello All,

    Could someone help me with this query please?

    In the attached file there are four sheets (USA, ROW, EU and DATA)

    All sheets have two columns in common (Country and Format)
    The "DATA" sheet has the "Format" column the other three sheets have the "Format" column populated.

    I need a macro to do the following:

    For each Country in sheet USA = Country in sheet DATA then make the Format column in the DATA sheet = the Format Column in the USA sheet.
    For each Country in sheet ROW = Country in sheet DATA then make the Format column in the DATA sheet = the Format Column in the ROW sheet.
    For each Country in sheet EU = Country in sheet DATA then make the Format column in the DATA sheet = the Format Column in the EU sheet.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: Populate a column depending on the contents of other sheets.

    Hi
    Cut and paste this formula into Cell I2 on your Data sheet and copy down:

    =IF(ISNA(VLOOKUP(H2,USA!A:B,2,0)),IF(ISNA(VLOOKUP(H2,EU!A:B,2,0)),VLOOKUP(H2,RoW!A:B,2,0),VLOOKUP(H2,EU!A:B,2,0)),VLOOKUP(H2,USA!A:B,2,0))

    Good luck.
    Tony

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Populate a column depending on the contents of other sheets.

    In I2 Cell of Data Sheet

    =IFERROR(VLOOKUP(H2,USA!A:B,2,FALSE),IFERROR(VLOOKUP(H2,EU!A:B,2,FALSE),IFERROR(VLOOKUP(H2,RoW!A:B,2,FALSE),"")))

    Drag it down…


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    06-19-2013
    Location
    Peterborough, UK
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Populate a column depending on the contents of other sheets.

    Thanks ARGK and Sixthsense both replies are spot on - fantastic result!!! Thank you very much again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. populate cells depending on the contents of a ComboBox
    By sheffieldlad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2013, 10:36 AM
  2. [SOLVED] Split One Column at Delimiter While Copying Contents of Second Column to Populate New Rows
    By medailSacrosanct in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-01-2012, 11:37 AM
  3. Sum depending on searching contents of another column
    By FCFalkirk in forum Excel General
    Replies: 3
    Last Post: 12-15-2010, 09:03 AM
  4. Replies: 0
    Last Post: 05-18-2010, 02:11 AM
  5. Copy a range to different sheets depending on first cell contents
    By WaveOfMutilation in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 03-01-2010, 12:58 PM

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