Assuming it's your intention to add more and more months to your file i would suggest the following (based on your existing setup and desired results):
a) rename each sheet in mmmyy format, ie:
Sheet1: Jun09
Sheet2: Jul09
Sheet3: Aug09
b) set Sheet4 up such that:
B1: =TEXT(A1,"mmmyyy")
apply to F1, J1 etc...
Formula in D1 thus becomes:
D1: =INDEX(INDIRECT("'"&B$1&"'!A1:AH31"),MATCH(IF($B2="",$B1,$B2),INDIRECT("'"&B$1&"'!A1:A31"),0)+($B2=""),MATCH(DAY(A$1),INDIRECT("'"&B$1&"'!A2:AH2"),0))
copy down as required
NOTE: INDIRECT is Volatile and given the volume with which they will be used in this instance performance of your file may well slow - for more info. on Volatile functions see please the link in my sig to Charles Williams' site.
Bookmarks