#1   Report Post  
pjd
 
Posts: n/a
Default Dates

Hi

I have a spreadsheet. Names listed down in column A and dates across the top.

In each row I have put a "L" at the beginning date of the employees' holiday
and drag it across to the last day of holiday.

What I would like to do in the end cloumn is (a formula??) to search across
the row from left to right, find the first "L" lookup up the dates at the top
of the column. And in the next cell do the same but look for the last "L: so
that I end up with;

Name First Day of Leave Last Day of Leave.
Jones A 15/12/04 06/01/05

I have many many names, so, if this could be done it would save me hours and
hours.

Thanks

All help much appreciated.

Thanks
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way, I assume here that the Ls we are checking is for person X in row 3,
the dates in row 1 and that the values start in column B going across

To get the start date use

=INDEX($B1:$IV1,MATCH("L",$B3:$IV3,0))

copy down

the end date

=INDEX($B1:$IV1,MAX(($B3:$IV3="L")*(COLUMN($B3:$IV 3)))-1)

entered with ctrl + shift & enter

note the minus 1, if the dates started in A1 ther wouldn't be anything, if
they start in column D use -3

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"pjd" wrote in message
...
Hi

I have a spreadsheet. Names listed down in column A and dates across the
top.

In each row I have put a "L" at the beginning date of the employees'
holiday
and drag it across to the last day of holiday.

What I would like to do in the end cloumn is (a formula??) to search
across
the row from left to right, find the first "L" lookup up the dates at the
top
of the column. And in the next cell do the same but look for the last "L:
so
that I end up with;

Name First Day of Leave Last Day of Leave.
Jones A 15/12/04 06/01/05

I have many many names, so, if this could be done it would save me hours
and
hours.

Thanks

All help much appreciated.

Thanks



  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Tue, 7 Dec 2004 18:09:03 -0800, pjd wrote:

Hi

I have a spreadsheet. Names listed down in column A and dates across the top.

In each row I have put a "L" at the beginning date of the employees' holiday
and drag it across to the last day of holiday.

What I would like to do in the end cloumn is (a formula??) to search across
the row from left to right, find the first "L" lookup up the dates at the top
of the column. And in the next cell do the same but look for the last "L: so
that I end up with;

Name First Day of Leave Last Day of Leave.
Jones A 15/12/04 06/01/05

I have many many names, so, if this could be done it would save me hours and
hours.

Thanks

All help much appreciated.

Thanks


I'm not quite sure how many columns you are using but I figured 31 for this
exercise. You may need to change some references depending on the layout of
your worksheet.

First Day of Leave (in AG2):

=INDEX($B$1:$AE$1,1,MATCH("L",B2:AF2,FALSE))

Last Day of Leave:

=AG2+COUNTIF(B2:AF2,"L")-1



--ron
  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Change the index part to $B$1:$IV$1

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"Peo Sjoblom" wrote in message
...
One way, I assume here that the Ls we are checking is for person X in row
3, the dates in row 1 and that the values start in column B going across

To get the start date use

=INDEX($B1:$IV1,MATCH("L",$B3:$IV3,0))

copy down

the end date

=INDEX($B1:$IV1,MAX(($B3:$IV3="L")*(COLUMN($B3:$IV 3)))-1)

entered with ctrl + shift & enter

note the minus 1, if the dates started in A1 ther wouldn't be anything, if
they start in column D use -3

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"pjd" wrote in message
...
Hi

I have a spreadsheet. Names listed down in column A and dates across the
top.

In each row I have put a "L" at the beginning date of the employees'
holiday
and drag it across to the last day of holiday.

What I would like to do in the end cloumn is (a formula??) to search
across
the row from left to right, find the first "L" lookup up the dates at the
top
of the column. And in the next cell do the same but look for the last "L:
so
that I end up with;

Name First Day of Leave Last Day of Leave.
Jones A 15/12/04 06/01/05

I have many many names, so, if this could be done it would save me hours
and
hours.

Thanks

All help much appreciated.

Thanks





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
grouping dates by week/month/etc. on cat. axis Kamal Hood Charts and Charting in Excel 4 January 23rd 05 10:06 AM
Ploting dates against a calendar and not as a simple events Barb Reinhardt Charts and Charting in Excel 2 January 22nd 05 02:41 AM
How do I import fractions without data being converted to dates? rproeber Excel Discussion (Misc queries) 1 December 6th 04 12:53 AM
Dates in spreadsheets Robert Newman Excel Discussion (Misc queries) 2 December 2nd 04 10:03 AM
How do I display months and years between two dates JSmith Excel Discussion (Misc queries) 1 November 30th 04 04:41 PM


All times are GMT +1. The time now is 11:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"