Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
malik641
 
Posts: n/a
Default Function to find row with most current date


I'm wondering if there's a way I could make a function where it would
use values from a certain row by means of the most current date within
that row.

Pretend I have

A1="5/25/2005" B1="NaOH" C1="$120.00"
A2="6/01/2005" B2="NaOH" C2="$145.00"
A3="6/22/2005" B3="HCl" C3="$100.00"

so now I want E1 to show me NaOH's most recent price based on column
A's date and (of course) column B's chemical (for reference to the
correct price).

Is this duable?


--
malik641
------------------------------------------------------------------------
malik641's Profile: http://www.excelforum.com/member.php...o&userid=24190
View this thread: http://www.excelforum.com/showthread...hreadid=381354

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

On Wed, 22 Jun 2005 13:44:54 -0500, malik641
wrote:


I'm wondering if there's a way I could make a function where it would
use values from a certain row by means of the most current date within
that row.

Pretend I have

A1="5/25/2005" B1="NaOH" C1="$120.00"
A2="6/01/2005" B2="NaOH" C2="$145.00"
A3="6/22/2005" B3="HCl" C3="$100.00"

so now I want E1 to show me NaOH's most recent price based on column
A's date and (of course) column B's chemical (for reference to the
correct price).

Is this duable?


Try this:

Assumptions:

Date = named range A1:An
Chemical = named range B1:Bn
Price = named range C1:Cn

G2: Name of chemical for which you need price.

This *array* formula should work:

=INDEX(A1:C10,MATCH(MAX(Date*(Chemical=G2)),Date*( Chemical=G2),0),3)

To enter an *array* formula, after typing or pasting it into the formula bar,
hold down <ctrl<shift while hitting <enter. Excel will place braces {...}
around the formula.

Note that if you decide to have a label row in row 1, you will need to adjust
your references or you may get a VALUE error.


--ron
  #3   Report Post  
malik641
 
Posts: n/a
Default


Awesome!! worked out just fine after a little fine tuning.

this is what I ended up with:

{=INDEX('Data Entry'!$G$2:$G$5000,MATCH(MAX('Data
Entry'!$A$2:$A$5000*('Data Entry'!$B$2:$B$5000=$A5)),'Data
Entry'!$A$2:$A$5000*('Data Entry'!$B$2:$B$5000=$A5),0))}

Thanks for the help ron, it was extremely useful!


--
malik641
------------------------------------------------------------------------
malik641's Profile: http://www.excelforum.com/member.php...o&userid=24190
View this thread: http://www.excelforum.com/showthread...hreadid=381354

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

On Thu, 23 Jun 2005 09:28:56 -0500, malik641
wrote:

Awesome!! worked out just fine after a little fine tuning.


I'm glad you got it working. Thank you for the feedback.


--ron
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
How do I create a schedule from a list of dates ? Gavin Morris Charts and Charting in Excel 2 October 28th 10 04:08 PM
Using date function in an if statement M Smith Excel Worksheet Functions 2 March 30th 05 06:53 PM
Lock in current date Angus Excel Discussion (Misc queries) 1 January 12th 05 05:27 PM
DATEVALUE OF CURRENT DATE JONBOYMFLY Excel Worksheet Functions 5 December 29th 04 05:55 PM
How do I program a cell to automaticinput the current date as dat. ces Excel Worksheet Functions 1 November 8th 04 11:11 PM


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

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"