Sardith Posted October 30, 2006 Posted October 30, 2006 If $Celsius = 1 or 2 or 3 or 4 Then I know this won't work. Is there any way to do: If $Celsius = 1 through 4? 1 or 2 etc. Is not working, I can't figure it out for some reason. Any help would be great. [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]
Paulie Posted October 30, 2006 Posted October 30, 2006 (edited) If $Celsius = 1 or 2 or 3 or 4 Then oÝ÷ ØêÚºÚ"µÍÝÚ]Ú ÌÍÐÙ[Ú]ÂØÙHBËØÙHËØÙHÂËØÙH Ë[ÝÚ]Ú Edited October 30, 2006 by Paulie
Locodarwin Posted October 30, 2006 Posted October 30, 2006 (edited) If $Celsius = 1 or 2 or 3 or 4 Then I know this won't work. Is there any way to do: If $Celsius = 1 through 4? 1 or 2 etc. Is not working, I can't figure it out for some reason. Any help would be great. If I interpret your problem correctly: If $Celsius > 0 Or $Celsius < 5 Then ; What to do when Celsius is 1, 2, 3, or 4. EndIf ...should be sufficient, as long as you're dealing with integers and not floating point numbers. You might also lookup StringRegExp() for some ways to really dial in your If tests. -S Edited October 30, 2006 by Locodarwin (Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]
Valuater Posted October 30, 2006 Posted October 30, 2006 (edited) If $Celsius > 0 And $Celsius < 5 ThenbecauseIf $Celsius > 0 or $Celsius < 5 Thenwont work8) Edited October 30, 2006 by Valuater
Sardith Posted October 30, 2006 Author Posted October 30, 2006 Thanks a lot Valuater [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]
Sardith Posted October 30, 2006 Author Posted October 30, 2006 Another question, so I can understand this for later use. $Code = "48313" $File = _TempFile() INetGet("http://www.weather.com/weather/local/" & $Code, $File, -1, 0) $Line = FileReadLine($File, 29) $LineA = StringSplit($Line, "") $Title = FileReadLine($File, 18) ;Get city and state name, 34 from left, 22 from the right $CityNameA = StringTrimLeft($Title, 34) $CityName = StringTrimRight($CityNameA, 22) $Fahrenheit = $LineA[38] & $LineA[39] & " °F"; Temperature 38, 39 Is there a way to look the file that you used INetGet, so I can choose what lines I want to read, other then guessing numbers? [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]
Locodarwin Posted October 30, 2006 Posted October 30, 2006 Whoops, replace the OR with an AND! Thanks for catching my goof, Valuator. -S (Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now