+ Reply to Thread
Results 1 to 3 of 3

Call the value of a variable for use in a function

  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    Bristol, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Call the value of a variable for use in a function

    Hey guys/gals, first post.

    Please Login or Register  to view this content.
    I am trying to create a formula in a cell using the line above. The formula needs to sum a range of cells on a different sheet, but that range of cells is subject to change according to the value 'd'.

    e.g. if d=12 the cells to be summed would be E10:E12.

    However, I get a message saying 'type mismatch' whenever I try to run the macro. Anyone know where I'm going wrong?

    Thanks

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Call the value of a variable for use in a function

    Try this.

    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-13-2013
    Location
    Bristol, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Call the value of a variable for use in a function

    Thanks!

    I was really over-complicating that!

+ 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. Call ListBox through variable
    By BrianAll in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-25-2013, 07:09 PM
  2. Call a constant/variable by creating another variable
    By pienaaj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-12-2013, 10:36 AM
  3. Call variable from String
    By juancamilo87 in forum Access Programming / VBA / Macros
    Replies: 4
    Last Post: 02-03-2011, 01:03 AM
  4. Is it possible to call a function as a Variable(Parameter) of an other function in VB
    By vsidharth in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2009, 05:25 PM
  5. Call function with a variable name ?
    By pMzQ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2007, 01:09 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