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 Type mismatch on If rng.Value < "0" Then


I have this loop below that I programmed on my machine at home, but when
I take the same file I run it on at home and the same code and plug it
in on another machine at home or even my machine at work I get an error
that points to the 'If rng.Value < "0" Then line that says

Run-time error '13':
Type mismatch



Code:
--------------------
For i = LaRow To 2 Step -1
Set rng = Range("T" & i)
If rng.Value < "0" Then
Range("A" & i & ":AE" & i).Interior.ColorIndex = 38
Range("A" & i & ":AE" & i).Interior.Pattern = xlSolid
Range("AR" & i).Value = "1"
End If
Next
--------------------


Earlier in the code I have the values in Column T formatted into
currency, like so.


Code:
--------------------
Range("T" & i).Style = "Currency"
--------------------


Maybe that has something to do with it? Any help on this error is
appreciated. Thanks in advance.


--
DKY
------------------------------------------------------------------------
DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=393837

 
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
"Type mismatch" when I try to fill an Array variable with "+" [email protected] Excel Discussion (Misc queries) 1 April 17th 07 01:28 PM
multiple file uploading - runtime error'13': type mismatch "While Counter <= UBound(FName)" Sinner Excel Discussion (Misc queries) 3 March 1st 07 09:44 AM
Run-time Error "13" - File Type Mismatch brentm Excel Programming 1 February 10th 05 05:09 PM
"FIND" generates "Type mismatch" error quartz[_2_] Excel Programming 5 November 16th 04 03:29 PM
Copying data to another worksheet gives "Type Mismatch" error TB[_3_] Excel Programming 6 July 28th 03 12:44 PM


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