How to display a cells data depending on date

Kyroc

New Member
Joined
Sep 9, 2014
Messages
7
Hello all, hopefully someone can help me with this.

I have a worksheet that has dates across row 1 for a year. In column A I have types of hours going down Eg: Normal, Overtime, Annual Leave, Sick Leave etc, with an amount for each date.

On a separate worksheet, how can I get it to display the figure in a particular cell depending on the date.

For example, if I put the date of 06/01/14 into a cell, how can I make the cell below that date show the sick leave figure for that particular date from the worksheet with all the data on it?

I hope that makes sense, I would post a sample table but cant get it to display properly.


<colgroup><col><col span="38"></colgroup><tbody>
</tbody>
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
1/06/2014 2/06/2014 3/06/2014 4/06/2014 5/06/2014 6/06/2014 7/06/2014
Normal8510350971213780
RDOW00160808
Sick881601688
Annual16161624242424
TIL0880000

<colgroup><col><col><col><col span="2"><col><col span="2"></colgroup><tbody>
</tbody>


So on another page if I put in a cell 05/06/2014 I want the cell below it to display the sick leave figure for this date, which in this instance is 16
 
Upvote 0
Try this
=INDEX(Sheet1!B2:H2,MATCH(Sheet2!$C$6,Sheet1!$B$1:$H$1,0))

If you want the data to kind of that looks like this :

ParticularsData
Date07-06-14
Normal80
RDOW8
Sick8
Annual24
TIL0

<tbody>
</tbody>

Hope this helps !!
 
Last edited:
Upvote 0
Index / match (already given as solution) wll do.

But I advice you to add the data in a verticaly structure (table form).

In that case you are able to use the powerfull Pivot Table.
 
Upvote 0
Yes ! I completely agree with @Oeldere,

try this one instead "=INDEX($B$3:$H$7,MATCH($A13,$B$2:$H$2,0),MATCH(B$12,$A$3:$A$7,0))"
If you want the data to look like this !

lookup val
Ret valueRet valueRet valueRet valueRet value
DateNormalRDOWSickAnnualTIL
01-06-14851035097121
02-06-14
001608
03-06-148816016
04-06-141616162424
05-06-1408800

<colgroup><col><col><col><col span="3"></colgroup><tbody>
</tbody>

(provided, the data is in same sheet, if not you can change that. Also the above formula is based on Source-data located from A2:H7)

Hope this will solve your pivot problem also.
 
Last edited:
Upvote 0
Thanks all for your help. The index/match works perfectly.

Normally I would have used a pivot table however the way the data is set out makes it impossible.
 
Upvote 0

Forum statistics

Threads
1,222,014
Messages
6,163,392
Members
451,834
Latest member
tomtownson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top