LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 186
Default vlookup with Dates

I'm using the sample data to clarify what I'm trying to do. Let's try this

Apple Low 5 Banana Low 6
Apple High 1
Orange Low 6
Orange High 2
Peach Low 7
Peach High 3

I'm looking for the result that appears prior to the item being looked up.
in the sample lookup for Banana the formula find the result for row 3 with
Orange. I want the result prior to Orange Low, Apple Low - row 1 answer 5

I'm not trying to add the data - just find it.




"ShaneDevenshire" wrote:

Hi,

Your sample keeps changing, the formula you are showing us
=IF(LOOKUP(D1,A1:A6,A1:A6)0,VLOOKUP(E1,B1:C6,2,TR UE),"") has nothing to do
with dates because all LOOKUP is doing is telling you that whether a date in
D1 is on or after the date in A1.

I think this may be what you want:

=SUMPRODUCT(--(A1:A6<=D1),--(E1=B1:B6),C1:C6)

--
Thanks,
Shane Devenshire


"Jack" wrote:

Let me backup and start over.

Here is the spread sheet

A B C D
E F
1/1/2008 Low 5 1/15/2008 Low 6
1/1/2008 High 1
2/1/2008 Low 6
2/1/2008 High 2
3/1/2008 Low 7
3/1/2008 High 3

This is the formula

=IF(LOOKUP(D1,A1:A6,A1:A6)0,VLOOKUP(E1,B1:C6,2,TR UE),"")

I need the information from the row with the date prior to the date I'm
looking for. There are different types of data for each date so the second
lookup.




"Peo Sjoblom" wrote:

If you put FALSE you should get #N/A so something "aint" right here


=VLOOKUP(D1,A1:B3,2)

where D1 holds 2/15/08 and A1:B3 is your example table I get 6 as expected

--


Regards,


Peo Sjoblom

"Jack" wrote in message
...
I have a column of dates that i what to do a lookup on. The column looks
like the following:

01/01/08 5
02/01/08 6
03/01/08 7


I what to find the value in column two for the date 2/15/08. If i put
False
in the vlookup formula i get 5 as the answer, if i put True i get 7 as
the
answer. How do i get the answer from the row with 2/01/08.




 
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
Vlookup on Dates LossManiac Excel Worksheet Functions 6 August 29th 08 02:25 PM
vlookup using dates MH Excel Discussion (Misc queries) 2 May 28th 07 05:53 PM
vlookup and dates! KneeDown2Up Excel Worksheet Functions 6 April 2nd 07 08:44 AM
dates and vlookup grapes Excel Worksheet Functions 1 February 2nd 06 09:19 PM
VLookUp with Dates o1darcie1o Excel Worksheet Functions 4 September 2nd 05 01:18 PM


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