+ Reply to Thread
Results 1 to 6 of 6

Offset function with reference cell equal to the value of match function

  1. #1
    Registered User
    Join Date
    10-08-2014
    Location
    Blacksburg, Virginia
    MS-Off Ver
    2013
    Posts
    18

    Offset function with reference cell equal to the value of match function

    Trying to use the offset function while having the reference cell be equal to a value that a match function has returned. I am getting an object required error when compiling. I realize that the value of the match function I receive is now equivalent to a 'reference cell' for the offset function but I am unsure of how to convert it into one.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,613

    Re: Offset function with reference cell equal to the value of match function

    Thre Match function returns an Index number and not a Range or cell.

    Try this...

    Range("Names").Cells(val,2).Value = x
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    10-08-2014
    Location
    Blacksburg, Virginia
    MS-Off Ver
    2013
    Posts
    18

    Re: Offset function with reference cell equal to the value of match function

    I tried that and I am no longer receiving an error however I added a watch to x and its value remains empty the whole time, thus returning and empty MsgBox

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,613

    Re: Offset function with reference cell equal to the value of match function

    The code doesn't set the value of x to anything, and I have no idea what you're trying to do with it.

  5. #5
    Registered User
    Join Date
    10-08-2014
    Location
    Blacksburg, Virginia
    MS-Off Ver
    2013
    Posts
    18

    Re: Offset function with reference cell equal to the value of match function

    I am trying to take the information that I receive from the offset function and display it into a msgbox, I guess I'm just not sure of the best way to go about doing that.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,613

    Re: Offset function with reference cell equal to the value of match function

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 01-19-2013, 01:35 PM
  2. Replies: 16
    Last Post: 12-24-2012, 06:21 AM
  3. OFFSET function with variable reference cell
    By smile2leksa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2009, 08:32 AM
  4. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  5. Offset function with nested match function not finding host ss.
    By MKunert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2006, 06:50 PM

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