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

YOU'RE A LEGEND!!! THANK YOU SO MUCH!!!! PERFECT!!!

Nat

"Max" wrote:

Thanks for the clarifications! Seems my interp on your orig. post was quite
way-off <g. Discard the previous attempt, let's try it all over again.

The revised construct below should do it now
(Link to revised sample file below)

In Sheet1
----
Source data is in cols A to L, with the codes in cols C to L

Using an empty col to the right, col M

Put in M1:
=IF(ISNUMBER(MATCH(Sheet2!$A$1,C1:L1,0)),ROW(),"")

Copy M1 down to say M50,
to cover the max expected source data range

To set up the conditional formatting (CF):
----------------
Select cols A to L

Click Format Conditional Formatting

Under Condition 1:
Formula is: =$M1<""
Click Format button Patterns tab Light green? OK
Click OK at the main dialog

This will colour all the rows in Sheet1 which have been "auto-filtered" into
Sheet2

In Sheet2
---------
Cell A1 is reserved for input of the code, e.g.: 33T, 32M, 22N, 11H, etc.
Input a code in A1, say: 33T

Put in A2:
=IF(ISERROR(SMALL(Sheet1!$M:$M,ROWS($A$1:A1))),"", INDEX(Sheet1!A:A,MATCH(SMA
LL(Sheet1!$M:$M,ROWS($A$1:A1)),Sheet1!$M:$M,0)))

Copy A2 across to L2, fill down to L51
(cover the same range size as done in col M in Sheet1)

Format col B as dates

Sheet2 will auto-return the desired results from Sheet1
depending on the code input in A1

For a cleaner look in Sheet2,
suppress the display of extraneous zeros via clicking:
Tools Options View tab Uncheck Zero values OK

Link to revised sample file for the above construct:
http://www.savefile.com/files/6175722
File: Calendar_Dates_Help_Nat2_misc.xls
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Nat" wrote in message
...
Wow, Max this is so great and I see you've put so much effort into this,
thank you so much!! I just have 2 little questions :0)

1) My source data in Sheet 1 is Column A-L, how do I amend the formula to


include these extra colums.

2) When I input the code ie. 33T it shows the first date that has that
code, but then it lists every single date after that, rather than only the
dates that show the code 33T?

Thank you so much!!

Nat