Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synatx and Logic correct?

Status
Not open for further replies.

vb89

MIS
Aug 21, 2008
47
US
I'm basically try to write a piece of code that displays which overtime it is based on the quarter of the game. Not sure if logic is correct and positive syntax isn't correct.

Code:
if cInt(quarters) > 4 then
	ot = (""&cInt(quarters) - 5&" OT))"
else 
	ot = " "
end if

If for example quarters was 5 then i would want the output to be:
(OT)
if quarters was 6 i would want the output to be:
(2OT)
etc...

Any help would be greatly appreciated...thanks

 
Code:
if cInt(quarters) = 5 then
    ot = "(OT)"
elseif cInt(quarters) > 5 then
    ot = "(" & cInt(quarters) - 4 & " OT)"
else 
    ot = " "
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top