#1   Report Post  
Aviator
 
Posts: n/a
Default Searching Columns

I have a box (cell) at the top of the page in which I want it to search a
column for the latest date. Once it finds the latest date it takes the data
from a cell in the same row as the latest date. Can this be done? If so, how?

Aviator
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

You can use a formula like:
=MAX(C:C)
to find the biggest date in column C (if column C contains nothing but dates)

To return the value in the column D that matches the biggest date:
=INDEX(D:D,MATCH(MAX(C:C),C:C,0))

Debra Dalgleish has some nice notes for =index(match()) at:
http://www.contextures.com/xlFunctions02.html

Aviator wrote:

I have a box (cell) at the top of the page in which I want it to search a
column for the latest date. Once it finds the latest date it takes the data
from a cell in the same row as the latest date. Can this be done? If so, how?

Aviator


--

Dave Peterson
  #3   Report Post  
Aviator
 
Posts: n/a
Default

This worked great! Thank you.

I have three additional similar questions.
1. Can you do the same thing but if there is no values have it left blank or
return Open? (Currently, it shows #NA)

2. Can you do the same thing except just include odd numbered rows? (ie. D3,
D5.... D589)?

3. Can you do the same thing except instead of the biggest date have the
second biggest date?

Thank you so much, I have al of these scenerios, and it's driving me crazy.

Thanks,

Aviator.



"Dave Peterson" wrote:

You can use a formula like:
=MAX(C:C)
to find the biggest date in column C (if column C contains nothing but dates)

To return the value in the column D that matches the biggest date:
=INDEX(D:D,MATCH(MAX(C:C),C:C,0))

Debra Dalgleish has some nice notes for =index(match()) at:
http://www.contextures.com/xlFunctions02.html

Aviator wrote:

I have a box (cell) at the top of the page in which I want it to search a
column for the latest date. Once it finds the latest date it takes the data
from a cell in the same row as the latest date. Can this be done? If so, how?

Aviator


--

Dave Peterson

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

#1. You can check the portion of the formula that returns the error. In this
case, it's the match() portion. Then have your formula do nice things:

=IF(ISERROR(MATCH(MAX(C:C),C:C,0)),"",INDEX(D:D,MA TCH(MAX(C:C),C:C,0)))

#2. I can't! But that doesn't mean that it's not able to be done. If you
don't get any help in .misc, you may want to head over to .worksheet.functions
and post there. The people who spend lots of time in that newsgroup have their
head on weird and can do miraculous stuff with formulas.

#3. The worksheet funtion =max(c:c) returns the largest in a list of numbers.
There's another worksheet function that can find the nth largest in a list.
=large(range,N)

=IF(ISERROR(MATCH(LARGE(C:C,2),C:C,0)),"",INDEX(D: D,MATCH(LARGE(C:C,2),C:C,0)))

One thing to worry about (needlessly???) is that if the largest and the second
largest dates are the same. Then the match will find the first in the list--no
matter which one you're looking for--and return the cell adjacent.





Aviator wrote:

This worked great! Thank you.

I have three additional similar questions.
1. Can you do the same thing but if there is no values have it left blank or
return Open? (Currently, it shows #NA)

2. Can you do the same thing except just include odd numbered rows? (ie. D3,
D5.... D589)?

3. Can you do the same thing except instead of the biggest date have the
second biggest date?

Thank you so much, I have al of these scenerios, and it's driving me crazy.

Thanks,

Aviator.

"Dave Peterson" wrote:

You can use a formula like:
=MAX(C:C)
to find the biggest date in column C (if column C contains nothing but dates)

To return the value in the column D that matches the biggest date:
=INDEX(D:D,MATCH(MAX(C:C),C:C,0))

Debra Dalgleish has some nice notes for =index(match()) at:
http://www.contextures.com/xlFunctions02.html

Aviator wrote:

I have a box (cell) at the top of the page in which I want it to search a
column for the latest date. Once it finds the latest date it takes the data
from a cell in the same row as the latest date. Can this be done? If so, how?

Aviator


--

Dave Peterson


--

Dave Peterson
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
Columns in Excel will not allow user to click in them Kim Excel Discussion (Misc queries) 1 December 28th 04 06:37 PM
Counting the Contents of Two Columns Molochi Excel Discussion (Misc queries) 6 December 22nd 04 08:13 PM
combining 3 columns of same info for a pivot table Julie Excel Worksheet Functions 0 December 15th 04 03:12 PM
interchange columns with rows Herman Excel Discussion (Misc queries) 2 December 8th 04 05:40 PM
Lookup Data in Several Columns simplywitt Excel Worksheet Functions 4 November 24th 04 04:11 PM


All times are GMT +1. The time now is 10:02 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"