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 2 values in array


The table has dates in the columns and names in the rows
An x indicates who's on duty that day.

.............01-10-2004 ... 02-10-2004 ... 03-10-2004 .....
Sonja .........x
Dirk ...............................x
Katia .................................................. .x
Jan .............x

When I type a particular date, Excel should show the name with the x

03-10-2004
KATIA

Who can help me solve the problem?
I have no knowledge of VBA code.


--
digicat
------------------------------------------------------------------------
digicat's Profile: http://www.excelforum.com/member.php...o&userid=14920
View this thread: http://www.excelforum.com/showthread...hreadid=273274

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default LOOKUP 2 values in array

In a public module:

Function strAssigned(rngTable As Range, dteDate As Date, strIdentifier As
Variant) As String
Dim intCol As Integer
Dim lngRow As Long
On Error Resume Next

intCol = rngTable.Rows(1).Find(What:=dteDate, LookAt:=xlWhole,
LookIn:=xlFormulas).Column
If intCol 0 Then
lngRow = rngTable.Columns(intCol).Find(What:=strIdentifier,
LookAt:=xlWhole, LookIn:=xlValues).Row
If lngRow 0 Then
strAssigned = rngTable.Cells(lngRow, 1).Value
Else
strAssigned = "Not assigned"
End If
Else
strAssigned = "Date not found"
End If
End Function

On the worksheet, enter the formula "=strAssigned(~the range of the
table~,~the cell containing the date you want to find~,~the letter (or
whatever) used to cross match~)

In cell B31, that might read: =strAssigned($A$1:$H$25,A30,"x")

Let me know if it works for you.

Dale Preuss


"digicat" wrote:


The table has dates in the columns and names in the rows
An x indicates who's on duty that day.

.............01-10-2004 ... 02-10-2004 ... 03-10-2004 .....
Sonja .........x
Dirk ...............................x
Katia .................................................. .x
Jan .............x

When I type a particular date, Excel should show the name with the x

03-10-2004
KATIA

Who can help me solve the problem?
I have no knowledge of VBA code.


--
digicat
------------------------------------------------------------------------
digicat's Profile: http://www.excelforum.com/member.php...o&userid=14920
View this thread: http://www.excelforum.com/showthread...hreadid=273274


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default LOOKUP 2 values in array

Hi
see your post in Excel.worksheet.functions

--
Regards
Frank Kabel
Frankfurt, Germany

"digicat" schrieb im Newsbeitrag
...

The table has dates in the columns and names in the rows
An x indicates who's on duty that day.

............01-10-2004 ... 02-10-2004 ... 03-10-2004 .....
Sonja .........x
Dirk ...............................x
Katia .................................................. .x
Jan .............x

When I type a particular date, Excel should show the name with the x

03-10-2004
KATIA

Who can help me solve the problem?
I have no knowledge of VBA code.


--
digicat
---------------------------------------------------------------------

---
digicat's Profile:

http://www.excelforum.com/member.php...o&userid=14920
View this thread:

http://www.excelforum.com/showthread...hreadid=273274


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default LOOKUP 2 values in array

I have sent you an email with an excel file attachment that should do what
you need !


"digicat" wrote:


The table has dates in the columns and names in the rows
An x indicates who's on duty that day.

.............01-10-2004 ... 02-10-2004 ... 03-10-2004 .....
Sonja .........x
Dirk ...............................x
Katia .................................................. .x
Jan .............x

When I type a particular date, Excel should show the name with the x

03-10-2004
KATIA

Who can help me solve the problem?
I have no knowledge of VBA code.


--
digicat
------------------------------------------------------------------------
digicat's Profile: http://www.excelforum.com/member.php...o&userid=14920
View this thread: http://www.excelforum.com/showthread...hreadid=273274


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
Help Please - Lookup in an array that has duplicte values CBI FlexCard Excel Worksheet Functions 2 November 6th 09 04:58 PM
Use array for lookup value, to return array of lookups Glen Excel Discussion (Misc queries) 3 May 7th 09 11:55 PM
Table Lookup formula where 2 known values are inside array excel-lookuper New Users to Excel 3 May 25th 07 05:49 AM
lookup a list of values for an array formula Xbrokylnboy Excel Worksheet Functions 0 June 19th 06 08:12 PM
find maximum of two values in an array with same lookup value Andy M Excel Discussion (Misc queries) 5 May 13th 05 01:31 PM


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