+ Reply to Thread
Results 1 to 3 of 3

Populate a column of cells based on a table

  1. #1
    Registered User
    Join Date
    01-24-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    2

    Red face Populate a column of cells based on a table

    Hi, this is my first post, apologies if it's a bit simple.

    I'd like to be able to automatically generate a date from a list based on two preceding entries. E.g. I have this table on the left referring to weeks, days and dates. If I enter in the blank cells under Week "2", under Day "4", I'd like excel to automatically associate it with the date 30/01/2014 and populate the cell with this date automatically. Is there a way of doing this with a formula, or any way at all? Sorry for the lines but couldn't display the table very well without them. Most grateful, Simon


    Week_Day__Date_______ Week___Day______Date
    1_____1____20/1_______ 2______ 4________
    1_____2____21/1
    1_____3____22/1
    2_____1____27/1
    2_____2____28/1
    2_____3____29/1
    2_____4____30/1

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,956

    Re: Populate a column of cells based on a table

    Hi and welcome to the forum

    Our date formats are different, so you may need to play around with this, but give it a shot. Use this ARRAY formula, copied down...
    =DATEVALUE(2014&"/"&INDEX($C$2:$C$8,MATCH(D2&E2,$A$2:$A$8&$B$2:$B$8,0)))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-24-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Populate a column of cells based on a table

    Thank you FDibbins.

    I tried this and got the following error message:

    errror.jpg

    If you could advise further I'd appreciate it.

    Thanks, Simon

+ 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. [SOLVED] Auto populate cells in one column based if cells in next column are populated
    By diablo86 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-22-2013, 06:29 AM
  2. Using Arrays to populate a column based on a look up type table
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-11-2012, 12:09 PM
  3. [SOLVED] How to populate a table based on the searched values in a pivoted table
    By Kausty88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2012, 06:11 AM
  4. Need to Populate Column Based on Table
    By jadown in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2012, 07:01 AM
  5. Populate a 2-column list based on highlighted cells
    By Pergo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-02-2011, 11:28 AM

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