View Single Post
  #5   Report Post  
 
Posts: n/a
Default

Thanks for the formula it worked, though I found another criteria using
Hlookup.
Fact it is used from below a bit strange.

1) Sheet 1 from A1:D5
Itemid 1-Feb-05 2-Feb-05 3-Feb-05
1 100 200 100
2 150 100 250
3 490 500 900
4 90 10 20
on row b6:d6 entered date again as
1-Feb-05 2-Feb-05 3-Feb-05

2) same sheet in column e2: e5
gave row id inclusive of date entered in row b6:d6
i.e. 5,4,3,2 respective rows e2:e5

3) Column F used max ()
for each row i.e. max(b2:d2)
same for respective row
4) Column G used hlookup()
for each row i.e. =HLOOKUP(F2,B2:D$6,E2,0)

5) Output in Column F and G is there

Question : Hlookup has to take value from first row since date is there
on top
it works only if the date is at the end. Why ?
=HLOOKUP(F2,B2:D$6,E2,0)
see the E2 it takes from below the value not from top i.e. b1 to d1
instead it takes from b6 : d6.