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: 1
Default If...Then Problem - bringing up wrong info!


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
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
pivot reporting wrong info-riv Rivers Excel Discussion (Misc queries) 1 September 19th 08 05:28 PM
Lookup function - Wrong info when I add lines to reference spreads bkala Excel Discussion (Misc queries) 0 January 11th 08 05:10 PM
question on links where info is added and cell location is wrong question on links where info is added an Links and Linking in Excel 1 October 5th 07 08:23 AM
lookup function bringing in wrong info Julieeeee Excel Worksheet Functions 8 August 24th 05 03:53 PM
Bringing info from userform to spreadsheet David Excel Programming 3 December 8th 03 03:09 AM


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