+ Reply to Thread
Results 1 to 4 of 4

Thorny VBA problem. Any creative solution appreciated.

  1. #1

    Thorny VBA problem. Any creative solution appreciated.

    I understand that functions can only modify the cell they are called
    from. However, if anyone has a solution to this problem, I would
    greatly appreciate it.

    A function F(N) does a vlookup in a table and returns a value.

    If it cannot find N in the table, I want to add N to a list in
    another table.

    F() is called from an addin if that is relevant.

    Any creative solution appreciated.

    Thanks
    Jeff Stryer


  2. #2
    Tim Williams
    Guest

    Re: Thorny VBA problem. Any creative solution appreciated.

    Your only solution is likely to be to use something along the lines of
    an event procedure (such as "calculate") instead of a UDF.


    If F() is called from an add-in, then where is the table to be
    modifed? In the activeworkbook?

    Tim.


    <[email protected]> wrote in message
    news:[email protected]...
    >I understand that functions can only modify the cell they are called
    > from. However, if anyone has a solution to this problem, I would
    > greatly appreciate it.
    >
    > A function F(N) does a vlookup in a table and returns a value.
    >
    > If it cannot find N in the table, I want to add N to a list in
    > another table.
    >
    > F() is called from an addin if that is relevant.
    >
    > Any creative solution appreciated.
    >
    > Thanks
    > Jeff Stryer
    >




  3. #3

    Re: Thorny VBA problem. Any creative solution appreciated.

    Yes, the table to be modified is in the active workbook.

    Tim Williams wrote:
    > Your only solution is likely to be to use something along the lines

    of
    > an event procedure (such as "calculate") instead of a UDF.
    >
    >
    > If F() is called from an add-in, then where is the table to be
    > modifed? In the activeworkbook?
    >
    > Tim.
    >
    >
    > <[email protected]> wrote in message
    > news:[email protected]...
    > >I understand that functions can only modify the cell they are called
    > > from. However, if anyone has a solution to this problem, I would
    > > greatly appreciate it.
    > >
    > > A function F(N) does a vlookup in a table and returns a value.
    > >
    > > If it cannot find N in the table, I want to add N to a list in
    > > another table.
    > >
    > > F() is called from an addin if that is relevant.
    > >
    > > Any creative solution appreciated.
    > >
    > > Thanks
    > > Jeff Stryer
    > >



  4. #4
    Stephen Bullen
    Guest

    Re: Thorny VBA problem. Any creative solution appreciated.

    Hi Jeff

    > I understand that functions can only modify the cell they are called
    > from. However, if anyone has a solution to this problem, I would
    > greatly appreciate it.
    >
    > A function F(N) does a vlookup in a table and returns a value.
    >
    > If it cannot find N in the table, I want to add N to a list in
    > another table.
    >
    > F() is called from an addin if that is relevant.
    >
    > Any creative solution appreciated.


    You might be able to adapt one of my posts on **** Kusleika's 'Daily
    Dose of Excel' blog:

    http://www.*****-blog.com/archives/2...hat-do-things/

    Regards

    Stephen Bullen
    Microsoft MVP - Excel
    www.oaltd.co.uk



+ 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