LOOKUP Help

D

diver_sol

Hi,

I have a column (e.g. Column X) that lists a series of dates, entered
by the user.

I have a table array (Columns A-L) of all the months, Jan-Dec.

What I want to be able to do is, under each month in the table, look
into Column X and list all the dates within Column X that are relevant
to that month.

I've tried LOOKUP but because dates are formatted like 31259 I dont
know how to write the logic.

Can anyone help?

Thanks a lot
 
M

Max

One way using non-array formulas is illustrated in this sample construct:
http://www.savefile.com/files/720924
Placing source dates under correct month col.xls

Source dates (ie real dates) assumed input in X2 down
A1:L1 contains the text: Jan, Feb, ... Dec

In Y2:
=TEXT(X2,"mmm")
Copy down

In Z1: =A1
Copy Z1 to AK1

In Z2:
=IF($X2="","",IF($Y2=Z$1,ROW(),""))
Copy Z2 to AK2, fill down to cover the max expected extent of data in col X

In A2:
=IF(ROW(A1)>COUNT(Z:Z),"",INDEX($X:$X,MATCH(SMALL(Z:Z,ROW(A1)),Z:Z,0)))
Copy A2 across to L2, fill down to cover the max expected extent of dates
for any one month. This returns the source dates from col X nicely under the
correct month's col, with all results neatly bunched at the top.
 
M

Max

In Z2:
=IF($X2="","",IF($Y2=Z$1,ROW(),""))

And if you want the dates under the month cols to be sorted in
chronologic/ascending order, just do a slight tweak to the formula in Z2,
viz. use instead in Z2:
=IF($X2="","",IF($Y2=Z$1,$X2+ROW(),""))
Copy Z2 to AK2, fill down to cover the max expected extent of data in col X

---
 
D

diver_sol

Wow, thanks a lot for that, a lot more than i was expecting!!

Thank you very much, I hope it didnt take you too long
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top