Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default First, Last occurance of date in column

Have ONE column of a little more then 1,000 dates, each in a different
cell.
Column is NOT in date order, nor can it be sorted.
Need to to know the first CELL LOCATION of a date,
and then the last CELL LOCATION of a date all in ONE (same) column.
Average 100 cells between first cell location of date and last cell
location.

Thanx.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,522
Default First, Last occurance of date in column

e1 has the date
=MATCH(e1,D:D,0)
for 1st
=MATCH(e1,D:D,1)
for last

On Nov 3, 12:12*pm, JumboShrimps wrote:
Have ONE column of a little more then 1,000 dates, each in a different
cell.
Column is NOT in date order, nor can it be sorted.
Need to to know the first CELL LOCATION of a date,
and then the last CELL LOCATION of a date all in ONE (same) column.
Average 100 cells between first cell location of date and last cell
location.

Thanx.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 87
Default First, Last occurance of date in column

On Nov 3, 11:12*am, JumboShrimps wrote:
Have ONE column of a little more then 1,000 dates, each in a different
cell.
Column is NOT in date order, nor can it be sorted.
Need to to know the first CELL LOCATION of a date,
and then the last CELL LOCATION of a date all in ONE (same) column.
Average 100 cells between first cell location of date and last cell
location.

Thanx.


I'll use the following, you most likely have them elsewhere.
- Dates in Column A starting in A5.
- Date being looked for in cell A1.

First row:
A2: =MIN(IF(A5:A1004=A1,ROW(A5:A1004),"")) entered with CTRL+SHIFT
+ENTER.

Last row:
A3: =MAX(IF(A5:A1004=A1,ROW(A5:A1004),"")) entered with CTRL+SHIFT
+ENTER.

If you need an actual cell location, you can go:
B2: =ADDRESS(A2,COLUMN(A5))
B3: =ADDRESS(A3,COLUMN(A5))

S
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default First, Last occurance of date in column

On Thu, 3 Nov 2011 10:12:18 -0700 (PDT), JumboShrimps wrote:

Have ONE column of a little more then 1,000 dates, each in a different
cell.
Column is NOT in date order, nor can it be sorted.
Need to to know the first CELL LOCATION of a date,
and then the last CELL LOCATION of a date all in ONE (same) column.
Average 100 cells between first cell location of date and last cell
location.

Thanx.


If the dates are in column A, and the date to find is in G2, then:

First Occurrence will be in row: =MATCH($G$2,$A:$A,0)
Last Occurrence will be in row: =LOOKUP(2,1/($G$2=$A:$A),ROW($A:$A))

If you need the actual address, use the ADDRESS function to give:

First Address: =ADDRESS(MATCH($G$2,$A:$A,0),1)
Last Address: =ADDRESS(LOOKUP(2,1/($G$2=$A:$A),ROW($A:$A)),1)


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default First, Last occurance of date in column

On Thu, 3 Nov 2011 10:52:30 -0700 (PDT), Don Guillett wrote:

=MATCH(e1,D:D,1)
for last


With an unsorted list I get #N/A for this one.


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,522
Default First, Last occurance of date in column

On Nov 3, 3:19*pm, Ron Rosenfeld wrote:
On Thu, 3 Nov 2011 10:52:30 -0700 (PDT), Don Guillett wrote:
=MATCH(e1,D:D,1)
for last


With an unsorted list I get #N/A for this one.


missed the sorting.
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 587
Default First, Last occurance of date in column

hi JumboShrimps,

for the last cell location
that is an array formula to validate with ctrl+maj+enter

=ADDRESS(MAX(IF(A1:A500<"",ROW(A1:A500))),MAX(IF( A1:A500<"",COLUMN(A1:A500))))

--
isabelle




Le 2011-11-03 13:12, JumboShrimps a écrit :
Have ONE column of a little more then 1,000 dates, each in a different
cell.
Column is NOT in date order, nor can it be sorted.
Need to to know the first CELL LOCATION of a date,
and then the last CELL LOCATION of a date all in ONE (same) column.
Average 100 cells between first cell location of date and last cell
location.

Thanx.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 587
Default First, Last occurance of date in column

for the last row location,

=ROW(INDIRECT(ADDRESS(MAX(IF($A$1:$A$500<"",ROW($ A$1:$A$500))),MAX(IF($A$1:$A$500<"",COLUMN($A$1:$ A$500))))))

still validate with Ctrl + Shift + Enter


--
isabelle


Le 2011-11-04 03:13, isabelle a écrit :
hi JumboShrimps,

for the last cell location
that is an array formula to validate with ctrl+maj+enter

=ADDRESS(MAX(IF(A1:A500<"",ROW(A1:A500))),MAX(IF( A1:A500<"",COLUMN(A1:A500))))

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
Find Every Occurance matching one Row and One Column rrcd124 Excel Discussion (Misc queries) 2 February 3rd 09 02:17 AM
Percentage of the occurance of a word in a date range Art-SNL Excel Worksheet Functions 8 May 6th 08 05:01 PM
Count occurance of a month in a column of dates? Stormy Excel Worksheet Functions 1 August 30th 07 06:44 PM
Countinge the occurance of numbers in a column Taxman New Users to Excel 3 December 1st 06 01:09 PM
Can I divide a column at the first "space" occurance jv Excel Worksheet Functions 7 February 21st 05 09:59 PM


All times are GMT +1. The time now is 03:29 PM.

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"