+ Reply to Thread
Results 1 to 3 of 3

Problem with assigning value from UDF to a cell

  1. #1
    Registered User
    Join Date
    04-01-2010
    Location
    providence, usa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Problem with assigning value from UDF to a cell

    Hi, Here is my requirement.

    I have multiple stock price worksheets. I need to assign a value to one of the cells from a UDF and then assign it to other cells below that. Here is the code that I have but keep running into a run-tiem error "424". "Object Required". I am not able to understand what the issue is. The UDF works correctly when I used it directly in the worksheet

    Please Login or Register  to view this content.
    priceroc here is the UDF

    Any help would be appreciated

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Problem with assigning value from UDF to a cell

    Try this instead:
    Please Login or Register  to view this content.

    It would be easier to test alternate ideas if you posted a workbook with the UDF installed.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-01-2010
    Location
    providence, usa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Problem with assigning value from UDF to a cell

    Quote Originally Posted by JBeaucaire View Post
    Try this instead:
    Please Login or Register  to view this content.

    It would be easier to test alternate ideas if you posted a workbook with the UDF installed.
    Thanks Jerry. That was partially helpful. Is it possible to change the R2C5 (the second parm) to not be constant. For e.g. in this case, the cell G12 would have priceroc($e12, $e$2)
    The cell g13 would have priceroc($e13, $e$2).. I want $e$3 or $e3 instead of $e$2 in this case

    Thanks Again!!

+ 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