Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. Function FindRng(StartRng As String, EndRng As String) As Variant
  2. Dim TopOfRange As Single
  3. Dim BottomOfRange As Single
  4.  
  5. TopOfRange = WorksheetFunction.Match(StartRng, Sheets("InfCom").Range("B:B"), 0)
  6. BottomOfRange = WorksheetFunction.Match(EndRng, Sheets("InfCom").Range("B:B"), 0)
  7.  
  8. FindRng = Range(Sheets("InfCom").Cells(TopOfRange, 2), Sheets("InfCom").Cells(BottomOfRange, 2))
  9. End Function
  10.  
  11. Function subsetPBPC(rngReturn As Range, LookupValueH As Variant, TopOfRange As String, BottomOfRange As String, LookupValueV As Variant) As Variant
  12.  
  13. subsetPBPC = sPBPC(rngReturn, LookupValueH, FindRng(TopOfRange, BottomOfRange), LookupValueV)
  14.  
  15. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement