+ Reply to Thread
Results 1 to 2 of 2

Pre fill data to sheet based on date input

  1. #1
    Registered User
    Join Date
    12-16-2019
    Location
    Norwich
    MS-Off Ver
    2013
    Posts
    3

    Pre fill data to sheet based on date input

    hi all,

    New here and fairly new to excel. Can do all the basic sum and countif formulas but not much after that.

    I am trying to make sheet "daily summary" fill in all the data to match the data on the sheet "stats" dependant on the date that is entered at the top. So if I were to input the 16/12/2019 on the daily summary, it would pull all the data from the stats sheet from that dates column.

    If any one could point me in the right direct to sort that would really appreciated.

    Thanks
    Michael

    Daily Summary.JPG

    stats.JPG

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Pre fill data to sheet based on date input

    Welcome to the forum.

    You can use Index-Match for this. The format is this:
    =INDEX ( the table you want to get information from , MATCH ( data to look up to find the right row , the column of the table to find this in , 0 ) , MATCH (date to look up to find the right column , the row of the table to find this in , 0 ))

    1. In this case, the table you want to get information from is: Stats!$A$1:$Z$24 (change the 'Z' to the last column of your table - or further to the right if you want to be able to extend it later without having to go back to amend your formulae).
    2. The data to look up to find the right row changes for each cell on the Daily Summary sheet. For example, for D6 it is the cell containing the label 'Total Calls' - that is, cell C6. This will change with each lookup, so you can leave it as a relative reference - that is 'C2' not '$C$2'.
    3. The column you want to find that data in is: Stats!$A$1:$A$24 (the first column of the table - note that the number of rows must be exactly the same as the whole table in point 1 - in other words don't make it $A$3:$A$24 for example).
    4. The date you want to search for, in other words cell D2 - this is a fixed cell, so needs to be an absolute reference $D$2.
    5. The row you will look up the date in is: Stats!$A$2:$Z$2 (as for point 3, the number of columns must be exactly the same as the whole table in point 1 - don't make this $B$2:$Z$2 for example).
    6. The zeroes in the two Match parts of the formula tell Excel to search for exact matches.

    Putting this all together gives you this formula for cell D6:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You can then copy and paste the formula to the other cells (D7, D8, ... G12, G13).

    Note that for the row lookup to work (point 3) the cells on your Daily Summary sheet must use exactly the same labels as on your Stats sheet. For example, if you change 'Total Calls' to 'Call Total' on one sheet but not on the other, the formula will return an '#N/A' error.
    Similarly for the column lookup to work (the date) the dates on your Daily Summary sheet and Stats sheets must either both be real dates or both just text - don't use real dates on one sheet and text on the other. The display format doesn't matter.
    (Explanation if you're unsure about Excel dates: A 'real' date in Excel is just a number, with '1' meaning 1st Jan 1900 - so today, 17th Dec 2019, is 43816 - which you can see if you format a date cell as 'General'. If you format a date cell as 'General' and it keeps showing (for example) '17/12/2019' then it's text, not a 'real' date.)


    Index-Match is a good formula to learn - it's very good for pulling information out of a range of data. There are loads of tutorials on the internet if you want to learn more.


    Hope that helps (and makes sense).
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

+ 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. Fill In Missing Hourly Data Based on Input Date - Excel/VBA
    By bathtub2007 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-03-2018, 08:50 PM
  2. [SOLVED] Automatically fill in the date of the month based on the first input.
    By Richard_Thornton in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2017, 11:10 AM
  3. Multiple date fill in based on cell input
    By gaker10 in forum Excel General
    Replies: 1
    Last Post: 02-09-2015, 03:20 PM
  4. Series fill based on variable input data
    By tearoz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2014, 08:37 PM
  5. Automatically Fill Adjacent Cells Based On Input Data
    By maxraph in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-26-2012, 01:04 PM
  6. As user fills out data sheet, then fill out a results sheet based on data sheet entry
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-13-2012, 03:57 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