Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Tim, Sorry for the late reply.I was out of station .here is my udf Function GetSalaryRange(strTitle As String) As Range Dim wsCatLookup As Worksheet Dim rngTemp, rngSalRng, rngTemp1 As Range Dim rngVar As Range Set wsCatLookup = ThisWorkbook.Sheets("CategoryLookup") Set rngTemp = wsCatLookup.Range("A4:B19") Set rngSalRng = wsCatLookup.Range("E4:G19") 'rngTemp.Select strCategory = WorksheetFunction.VLookup(strTitle, rngTemp, 2 True) Set rngVar = rngSalRng.Find(what:=strCategory,, LookAt:=xlWhole, _ LookIn:=xlValues).Offset(0, 1).Resize(1, 2) Set GetSalaryRange = rngVar End Functio -- xcelio ----------------------------------------------------------------------- xcelion's Profile: http://www.excelforum.com/member.php...fo&userid=1628 View this thread: http://www.excelforum.com/showthread.php?threadid=31373 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Defined Function returning #Value! | Excel Worksheet Functions | |||
User-defined range for graph | Excel Discussion (Misc queries) | |||
Passing a range to a user defined function | Excel Discussion (Misc queries) | |||
User-defined data type; Error: Only User-defined types... | Excel Programming | |||
external range in VBA (user defined formula) | Excel Programming |