Lookup Statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I've got data like this on a sheet

1 2
Date
04-Feb-04 81.32 0.28
81.85 0.24
82.24 0.24
82.5 0.24
05-Feb-04 82.78 0.28
77.77 0.24
66.43 0.28
67.25 0.24

I want to be able to enter two dates on a seperate sheet
like so

Start Date: 01/01/04
End Date: 04/02/04


and have all the data from rows 1 and 2 between these two
dates to appear automatically, the problem is I dont know
how to do this, im trying to combine lookup and cell
statments but having limited success, can any one help?

Thanks
 
Hi
one way:
Assumptions:
- row one on sheet 1 is a heading row in your data starts
in row 2
- on your sheet 2 you enter thet starting date in A1 and
the ending date in A2

Now use the following formulas:
B1:
=MATCH(A1,'sheet1'!$A$1:$A$1000,0)
copy down to B2

A3: first data row:
=IF(ROW()-2>$B$2-$B$1+1,"",INDEX('sheet1'!$A$1:$A$1000,ROW
(1:1)-1+$B$1))

B3:
=IF(ROW()-2>$B$2-$B$1+1,"",INDEX('sheet1'!$B$1:$B$1000,ROW
(1:1)-1+$B$1))

and copy both down
 
Thank you very much




-----Original Message-----
Hi
one way:
Assumptions:
- row one on sheet 1 is a heading row in your data starts
in row 2
- on your sheet 2 you enter thet starting date in A1 and
the ending date in A2

Now use the following formulas:
B1:
=MATCH(A1,'sheet1'!$A$1:$A$1000,0)
copy down to B2

A3: first data row:
=IF(ROW()-2>$B$2-$B$1+1,"",INDEX('sheet1'! $A$1:$A$1000,ROW
$B$1:$B$1000,ROW
(1:1)-1+$B$1))

and copy both down

.
 
Back
Top