+ Reply to Thread
Results 1 to 4 of 4

Formula to fill cells based on the date in another cell

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    1

    Exclamation Formula to fill cells based on the date in another cell

    Hey,

    I have recently created a dayfile userform where the user enters In customer information, along with the date the customer is due to be called back. This data is then stored in another sheet.

    What I am trying to do is write a formula for the main tab that if the callback date equals today, every customer due that day has their details pulled through to the main tab. I've made a few attempts but not no avail.

    Hope you can help!

    Thanks

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Formula to fill cells based on the date in another cell

    Even if you put the callback due date in the first column of the data sheet, using VLOOKUP() or MATCH()/INDEX() would only retrieve the first matching row and not all the rows for that date. To get all the matching rows, see:

    http://office.microsoft.com/en-us/ex...001226038.aspx
    Gary's Student

  3. #3
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Formula to fill cells based on the date in another cell

    You could also consider using a pivot table instead of formulas - it's much more flexible and can be reorganized on the fly for different dates, different customer layouts, etc. To create one, click anywhere in your data, then from the insert ribbon, select data table and follow the prompts.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula to fill cells based on the date in another cell

    Assuming date is stored in say A1,

    =IF($A$1<>TODAY(),"",IFERROR(INDEX(Sheet2!A$2:A$100,SMALL(IF(Sheet2!$D$2:$D$100=$A$1,ROW(Sheet2!$A$2:$A$100)-ROW($A$2)+1),ROWS($A$2:$A2))),"")

    where Sheet2 is your database sheet, and column A contains customer info, and column D contains the call back date.

    adjust the sheetname and ranges to suit, (don't use too large column sizes) and then confirm with CTRL+SHIFT+ENTER not just ENTER and copy down.... you can also copy across if more info in adjacent columns
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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