Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Lookup with several criteria: VBA needed?

Dear all,
I am trying to merge datasets for statistical purposes and run into
trouble. Two sheets are involved with columns as follows:


Sheet 1
Company Individual Date

Sheet 2
Company Individual Status Date_Start Date_End


Sheet 1 lists individuals, associated with companies, at various times.
From Sheet 2 I want to extract the status of that individual as

specified for a given date range.

Most of the lookup discussions on the internet discuss the exact
matching of one or more criteria. Before extracting Status, I need to
check that the company and individual
match as well as ensuring that the date falls within the correct
range.
The Lookup function appears to stop at the first match, hence nesting
statements is difficult. Can VBA solve my problem? I am comfortable
with Excel but I'm quite new to VBA!

//Thomas, grateful student!



Example:
------------
Sheet 1
Company Individual Date
BOEING ADAM 20050115
BOEING ADAM 20050205
COKE ERIC 20050205
COKE CHRIS 20050603

Sheet 2
Company Individual Status Date_Start Date_End
BOEING ADAM Manager 20050101 20050120
BOEING ADAM Owner 20050125 20050302
COKE ERIC Assoc 20050201 20050810
COKE CHRIS Assoc 20040620 20060101

I would like the output on sheet 1 to become:

Sheet 1
Company Individual Date Status
BOEING ADAM 20050115 Manager
BOEING ADAM 20050205 Owner
COKE ERIC 20050205 Assoc
COKE CHRIS 20050603 Assoc

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
Lookup help needed Guntars Excel Worksheet Functions 1 May 22nd 09 07:08 AM
Lookup help needed Guntars Excel Worksheet Functions 3 May 22nd 09 05:27 AM
Lookup value needed Deepak Excel Discussion (Misc queries) 3 July 6th 08 03:30 AM
Matrix lookup/mulitple criteria lookup MarkFranklin Excel Discussion (Misc queries) 3 March 31st 08 10:15 AM
Formula needed for 2 criteria Sue Excel Worksheet Functions 3 April 5th 06 01:44 PM


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