+ Reply to Thread
Results 1 to 5 of 5

keep getting type mismatch error

  1. #1
    Registered User
    Join Date
    02-15-2006
    Posts
    13

    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

  2. #2
    Bob Umlas
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #3
    Mr. Know Nothing
    Guest

    RE: 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. #4
    Registered User
    Join Date
    02-15-2006
    Posts
    13
    Below is the line that gets the debug error.

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

  5. #5
    Registered User
    Join Date
    02-15-2006
    Posts
    13
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1