+ Reply to Thread
Results 1 to 5 of 5

varying a range in a formula

  1. #1
    Registered User
    Join Date
    11-13-2008
    Location
    The Netherlands
    Posts
    21

    varying a range in a formula

    I need some programming help to control the length of the range in the formula below:

    Please Login or Register  to view this content.
    The start and stop values of the range are in the worksheet in cell C10 and C11 as integers.
    Is it possible to change this formula in such a way that the formula is controlled by the content of the cells C10 and C11?

    Your help will be appreciated very much.
    Last edited by Justme47; 05-31-2009 at 10:10 AM.

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: varying a range in a formula

    How do you mean that they're integers.
    There are 2 cells named,
    A2 and A10
    That would require 4 integers to define:
    IE
    cells(2, 1) and cells(10, 1)
    2,1,10,1

    What is the content of C10 and C11?
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  3. #3
    Registered User
    Join Date
    11-13-2008
    Location
    The Netherlands
    Posts
    21

    Re: varying a range in a formula

    The following was meant:

    In cell C10 and C11 are the values to which the range must be changed.
    When e.g. in C10 is 25 and in C11 is 35 the the range should be
    Please Login or Register  to view this content.
    Is this possible to change this formula acordingly or is there another solution e.g. a UDF?

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    21,529

    Re: varying a range in a formula

    You can use VBA

    Please Login or Register  to view this content.
    If doing natively (ie entering formula into cell without VBA) you could use INDEX (preferable to INDIRECT as non-volatile), eg:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-13-2008
    Location
    The Netherlands
    Posts
    21

    Re: varying a range in a formula

    The Code option using Range in the formula works only when the macro is run.
    The Code option, using INDEX, works fine for me

    Thanks for your help DonkeyOte

+ 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