Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Complex VLookup Formula

I have two worksheets:

The first sheet contains date ranges that relate to specific "Rounds":

Start End Round
3-Apr-10 15-Apr-10 1
20-Mar-10 2-Apr-10 2
6-Mar-10 19-Mar-10 3
20-Feb-10 5-Mar-10 4

The second worksheet contains a list of tasks which include a start date and
an end date. I would like to set up a formula that would look at the end date
for each task, and automatically assign the proper "Round" number in a
separate column, using the data from the first sheet. So for example, if a
task has an end date of 5-Apr-10, the formula will insert a 1 in the Round
column in that specific row.

HELP!!!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Complex VLookup Formula

It appears that no date intervals will overlap so try this:

A2 = some date

=SUMPRODUCT(--(A2=Sheet1!A2:A5),--(A2<=Sheet1!B2:B5),Sheet1!C2:C5)

=SUMPRODUCT(--(A2=Start),--(A2<=End),Round)

--
Biff
Microsoft Excel MVP


"simer" wrote in message
...
I have two worksheets:

The first sheet contains date ranges that relate to specific "Rounds":

Start End Round
3-Apr-10 15-Apr-10 1
20-Mar-10 2-Apr-10 2
6-Mar-10 19-Mar-10 3
20-Feb-10 5-Mar-10 4

The second worksheet contains a list of tasks which include a start date
and
an end date. I would like to set up a formula that would look at the end
date
for each task, and automatically assign the proper "Round" number in a
separate column, using the data from the first sheet. So for example, if a
task has an end date of 5-Apr-10, the formula will insert a 1 in the Round
column in that specific row.

HELP!!!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Complex VLookup Formula

Can you sort the data table on Start or End Date, so that it looks
like this:

Start End Round
20-Feb-10 5-Mar-10 4
6-Mar-10 19-Mar-10 3
20-Mar-10 2-Apr-10 2
3-Apr-10 15-Apr-10 1

?

If so, then suppose your end dates are in column E of sheet2, starting
on row 2. Use this formula to get the Round:

=VLOOKUP(E2,Sheet1!B$2:C$5,2)

Hope this helps.

Pete

On Aug 20, 12:16*am, simer wrote:
I have two worksheets:

The first sheet contains date ranges that relate to specific "Rounds":

Start * * * * End * * * * * Round
3-Apr-10 * * * * * 15-Apr-10 * * *1
20-Mar-10 * * * * *2-Apr-10 * * * * * * 2
6-Mar-10 * * * * * 19-Mar-10 * * *3
20-Feb-10 * * * * *5-Mar-10 * * * *4

The second worksheet contains a list of tasks which include a start date and
an end date. I would like to set up a formula that would look at the end date
for each task, and automatically assign the proper "Round" number in a
separate column, using the data from the first sheet. So for example, if a
task has an end date of 5-Apr-10, the formula will insert a 1 in the Round
column in that specific row.

HELP!!!


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
complex vlookup function - possible? help! [email protected] Excel Worksheet Functions 2 November 18th 08 09:51 PM
Complex Vlookup Table maacmaac Excel Discussion (Misc queries) 3 January 10th 06 11:11 AM
Help with complex VLOOKUP [email protected] Excel Discussion (Misc queries) 3 November 15th 05 07:43 PM
Help with complex VLOOKUP [email protected] Excel Worksheet Functions 3 November 15th 05 07:43 PM
Complex VLOOKUP Domenic Excel Discussion (Misc queries) 0 February 18th 05 06:37 PM


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