Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Everyone, I am trying to make an IF...THEN statement that will use different set of equations based on what the user uses as an input. However, th program brings up the wrong equations for the input sets. I feel tha the problem probably exists in the If...Then statement. I'm pretty ne at this so if anyone has any suggestions, please let me know. I' attaching the piece of code below. Thanks, ![]() Gunman 'Routing information to the correct Rjc equations based on "Wdth" siz and "GP" If Wdth < 550 And GP < 15 Then Rjc = Rjc5001 ElseIf Wdth < 550 And GP 20 Then Rjc = Rjc5002 ElseIf Wdth < 550 And 15 <= GP <= 20 Then Rjc = Rjc5003 ElseIf 550 <= Wdth < 650 And GP < 15 Then Rjc = Rjc6001 ElseIf 550 <= Wdth < 650 And GP 20 Then Rjc = Rjc6002 ElseIf 550 <= Wdth < 650 And 15 <= GP <= 20 Then Rjc = Rjc6003 ElseIf 650 <= Wdth < 750 And GP < 15 Then Rjc = Rjc7001 ElseIf 650 <= Wdth < 750 And GP 20 Then Rjc = Rjc7002 ElseIf 650 <= Wdth < 750 And 15 <= GP <= 20 Then Rjc = Rjc7003 ElseIf 750 <= Wdth <= 850 And GP < 15 Then Rjc = Rjc8001 ElseIf 750 <= Wdth <= 850 And GP 20 Then Rjc = Rjc8002 ElseIf 750 <= Wdth <= 850 And 15 <= GP <= 20 Then Rjc = Rjc8003 Else: Rjc = 0 End I -- gunma ----------------------------------------------------------------------- gunman's Profile: http://www.excelforum.com/member.php...fo&userid=2399 View this thread: http://www.excelforum.com/showthread.php?threadid=37682 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pivot reporting wrong info-riv | Excel Discussion (Misc queries) | |||
Lookup function - Wrong info when I add lines to reference spreads | Excel Discussion (Misc queries) | |||
question on links where info is added and cell location is wrong | Links and Linking in Excel | |||
lookup function bringing in wrong info | Excel Worksheet Functions | |||
Bringing info from userform to spreadsheet | Excel Programming |