LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default I need some checking done

Hello all i wrote a vb function and it doesnt seem to be working, help me out
and check it over

Here is the code:

Dim Amps As Range
Dim BrkL As Range
Dim CondMat As Variant
Dim CondTemp As Variant
Dim Conduit As Variant
Dim CondInsul As Variant
Dim CondTbl As Worksheet
Dim FeedEst As Worksheet
Dim Conductor As String

Public Function CdLkUp(BrkL, Amps, CondMat, CondTemp) As Variant

Set CondTbl = Worksheets("Conductor Tables")
Set FeedEst = Worksheets("Feeder Est.")

Select Case Amps
Case Is <= 20
CondLookup = CondTbl.Range("S43")

Select Case CondMat
Case Is = "Cu"
Select Case CondTemp
Case Is = 60
CdLkUp = Application.WorksheetFunction.VLookup(BrkL, _
CondTbl.Range("b10:e39"), 4, True)
Case Is = 75
CdLkUp = Application.WorksheetFunction.VLookup(BrkL, _
CondTbl.Range("c10:e39"), 3, True)
Case Is = 90
CdLkUp = Application.WorksheetFunction.VLookup(BrkL, _
CondTbl.Range("d10:e39"), 2, True)
End Select
Case Is = "Al"
Select Case CondTemp
Case Is = 60
CdLkUp = Application.WorksheetFunction.VLookup(BrkL, _
CondTbl.Range("f10:i39"), 4, True)
Case Is = 75
CdLkUp = Application.WorksheetFunction.VLookup(BrkL, _
CondTbl.Range("g10:i39"), 3, True)
Case Is = 90
CdLkUp = Application.WorksheetFunction.VLookup(BrkL, _
CondTbl.Range("h10:i39"), 2, True)
End Select
End Select
End Select
End Function
 
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
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Day Checking K1KKKA Excel Discussion (Misc queries) 4 January 30th 07 08:19 PM
Checking [email protected] Excel Programming 1 December 15th 05 06:31 PM
Checking for changes. Neil Excel Programming 1 August 9th 05 06:43 PM
#NUM checking Lp12 Excel Programming 1 December 5th 04 07:05 AM


All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"