Results 1 to 4 of 4

Range variable not working in match command

Threaded View

  1. #1
    Registered User
    Join Date
    09-16-2009
    Location
    Aurora
    MS-Off Ver
    Excel 2003
    Posts
    8

    Range variable not working in match command

    I cannot get my code to recognize the variable punchrange
    There is a sheet called HPpunch
    There is data in B5:V16 (dollar values)
    I keep getting the error type mis match
    I have tried changing quite a few then but to no avail.
    The text box only displays the value there is no input by the user. I just needed somewere to display the final value

    Can sombody helpm with this

    Thanks

    Jamie Lill


    Private Sub TextBox160_Change()
    Dim PunchRange As Range
    Dim Cnumber As Integer
    Set PunchRange = Sheets("HPpunch").Range("B5:V16")
    If ListBox11.Text = "HP" Then
    Cnumber = "=Match(ListBox16.Value, PunchRange)"
    TextBox160.Text = "=VLookup(ListBox13, PunchRange, Cnumber,)"
    End If
    End Sub
    Last edited by jamielill; 10-02-2009 at 04:12 PM. Reason: no code tags

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