+ Reply to Thread
Results 1 to 3 of 3

table interpolation

  1. #1
    Registered User
    Join Date
    11-21-2006
    Posts
    2

    table interpolation

    i'm writing a simple vb code for excel to interpolate data from a given table.

    i have been successful in doing this with the data tabulated in column (see attached pix: excelforum1.jpg), but not when it is in rows (see attached pix: excelforum2.jpg).

    i was thinking of two ways to solve the problem, one is to resize the table to a single row, and the other is to add a transpose function to the ivlookup code.

    the problem with my first solution is that VB shows an error if I resize the table to a single row, ie 'TableCol = Application.WorksheetFunction.Match(x, table.Resize(1, ), 1)'. to the other solution, VB doesn't show any error but Excel returns an error value, ie 'table = Application.WorksheetFunction.Transpose(table)'.

    any advise will be greatly appreciated. thanks.
    Attached Images Attached Images

  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Sorry, I'm not familiar with IHLOOKUP/IVLOOKUP. Where do these functions come from/how are they defined?

    Scott

  3. #3
    Registered User
    Join Date
    11-21-2006
    Posts
    2
    sorry about not clarifying further. i made those custom function for my worksheet. anyway, i found a workaround to solve the resizing, and it is now working.

    instead of leaving the variant as blank or ommited, ie 'tablecol = Application.WorksheetFunction.Match(x, table.Resize(1, blank), 1)', as described in the VB Excel Help (Resize Property) to retain the number of columns when resizing the row, I just inserted 'table.Columns.Count' to the blank.

+ 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