Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default first cell in a column with a specific value

I have a column of dates in the format mm/dd/yyyy. I want to find the first
occurence of the year 2005 in that column.
LOOKUP(2005,YEAR($A$2:$A$114),$A$2:$A$114) gives me the last occurence. How
can I find the first occurence? Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default first cell in a column with a specific value

Try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=INDEX($A$2:$A$114,MATCH(TRUE,YEAR($A$2:$A$114)=20 05,0))

Format as DATE

Biff

"mpierre" wrote in message
...
I have a column of dates in the format mm/dd/yyyy. I want to find the
first
occurence of the year 2005 in that column.
LOOKUP(2005,YEAR($A$2:$A$114),$A$2:$A$114) gives me the last occurence.
How
can I find the first occurence? Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default first cell in a column with a specific value

=INDEX(A2:A114,MATCH(2005,YEAR(A2:A114),0))

ctrl+shift+enter (not just enter)


"mpierre" wrote:

I have a column of dates in the format mm/dd/yyyy. I want to find the first
occurence of the year 2005 in that column.
LOOKUP(2005,YEAR($A$2:$A$114),$A$2:$A$114) gives me the last occurence. How
can I find the first occurence? Any ideas?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default first cell in a column with a specific value

mpierre,

1. maybe your formula will work:, lookup( _ , _ , _) if the dates are sorted
in increasing order.
2. otherwise use auto filter. by making the date format as YYYY-mm-dd or
YYYY only, You can visibly find the location of the first occurence.



"mpierre" wrote:

I have a column of dates in the format mm/dd/yyyy. I want to find the first
occurence of the year 2005 in that column.
LOOKUP(2005,YEAR($A$2:$A$114),$A$2:$A$114) gives me the last occurence. How
can I find the first occurence? Any ideas?

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
Cell References [email protected] Excel Discussion (Misc queries) 2 November 15th 06 11:37 PM
macro unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 02:21 AM.

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

About Us

"It's about Microsoft Excel"