Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default keep getting type mismatch error


I keep getting a "type mismatch" error for below. I know it has to be
something simple that I'm missing. Can anyone help?


If .Range("j2") < .Range("k1") Then
..Range("a4:i4") = .Range("a3:i3")
..Range("a4:i4").Value = .Range("a4:i4").Value
..Range("e4") = "PA"
..Range("e5") = Evaluate("f3*k1-j1")
End If


--
vbidiot
------------------------------------------------------------------------
vbidiot's Profile: http://www.excelforum.com/member.php...o&userid=31582
View this thread: http://www.excelforum.com/showthread...hreadid=512725

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 301
Default keep getting type mismatch error

works fine for me (no errors) - it may depend on what's in the cells you're
referencing.
But the statement Range("A4:i4")=.Range("A3:I3") should really contain
".value" at the end of the range. or it won't work as expected.

"vbidiot" wrote in
message ...

I keep getting a "type mismatch" error for below. I know it has to be
something simple that I'm missing. Can anyone help?


If .Range("j2") < .Range("k1") Then
Range("a4:i4") = .Range("a3:i3")
Range("a4:i4").Value = .Range("a4:i4").Value
Range("e4") = "PA"
Range("e5") = Evaluate("f3*k1-j1")
End If


--
vbidiot
------------------------------------------------------------------------
vbidiot's Profile:

http://www.excelforum.com/member.php...o&userid=31582
View this thread: http://www.excelforum.com/showthread...hreadid=512725



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default keep getting type mismatch error

On what line exactly are you getting the error??

"vbidiot" wrote:


I keep getting a "type mismatch" error for below. I know it has to be
something simple that I'm missing. Can anyone help?


If .Range("j2") < .Range("k1") Then
.Range("a4:i4") = .Range("a3:i3")
.Range("a4:i4").Value = .Range("a4:i4").Value
.Range("e4") = "PA"
.Range("e5") = Evaluate("f3*k1-j1")
End If


--
vbidiot
------------------------------------------------------------------------
vbidiot's Profile: http://www.excelforum.com/member.php...o&userid=31582
View this thread: http://www.excelforum.com/showthread...hreadid=512725


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default keep getting type mismatch error


Below is the line that gets the debug error.

If .Range("j2") < .Range("k1") Then


--
vbidiot
------------------------------------------------------------------------
vbidiot's Profile: http://www.excelforum.com/member.php...o&userid=31582
View this thread: http://www.excelforum.com/showthread...hreadid=512725

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default keep getting type mismatch error


Here's code before the line that debugs. Could that be a problem?

..Range("j1") = Evaluate("=f1*g1" + "f2*g2")
..Range("j2") = Evaluate("=j1\f3")
..Range("k1") = 10
If .Range("j2") < .Range("k1") Then
..Range("a4:i4").Value = .Range("a3:i3").Value
..Range("e4") = "PA"
..Range("f4") = Evaluate("f3*k1-j1")
End If


--
vbidiot
------------------------------------------------------------------------
vbidiot's Profile: http://www.excelforum.com/member.php...o&userid=31582
View this thread: http://www.excelforum.com/showthread...hreadid=512725



Reply
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
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Why Type Mismatch error David Excel Programming 5 July 23rd 05 02:37 AM
Type Mismatch error Jeff Wright[_2_] Excel Programming 8 April 25th 05 03:02 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM


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