+ Reply to Thread
Results 1 to 4 of 4

Using a variable within a formula

  1. #1
    Registered User
    Join Date
    10-21-2010
    Location
    Copenhagen
    MS-Off Ver
    Excel 2003
    Posts
    33

    Using a variable within a formula

    I've got the following problem:

    I am trying to use a variable within a formula that should be inserted in a cell, but I get the following error:

    Run-time error '1004':

    Application-defined or object-defined error

    Please Login or Register  to view this content.

    The variable "Variable" is the last row of interrest in "Sheet1"
    Last edited by Freakazoid; 04-28-2011 at 08:16 AM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using a variable within a formula

    Assuming your variable is an integer
    Please Login or Register  to view this content.

    Hope this helps
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    10-21-2010
    Location
    Copenhagen
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Using a variable within a formula

    It did not help me, I still have the same problem. The solution you posted was also my own first attempt, and the [] was something I read about on another website.

    So still I would appreciate it if anybody could help me.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using a variable within a formula

    In the absence of your workbook, try this workbook

    Run the macro "test" and check the result with the dropdown in "Dashboard" A3
    Please Login or Register  to view this content.

    If this is not what you are trying to do, then post a sample workbook, with the data you are trying to find and your code.
    Attached Files Attached Files

+ 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