+ Reply to Thread
Results 1 to 9 of 9

Dynamic range

Hybrid View

  1. #1
    Registered User
    Join Date
    05-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    85

    Dynamic range

    Hello people!

    I can't succeed in making a dynamic range.

    The name of the document is "Porteføljer.xlsm" and the name of the specific sheet is 'Porteføljer '
    Under formulas I name the x axis coloumn "Years" and define is as: =OFFSET('Porteføljer '!$A$4;0;0;COUNT('Porteføljer '!$A:$A))
    and I define my x axis as ='Porteføljer.xlsm'!Years

    What am I doing wrong?

  2. #2
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: Dynamic range

    You seem to be missing an argument at the end of the formula.

    =OFFSET(StartCell,0,0,COUNT(Range),1)
    If I've been of help, please hit the star

  3. #3
    Registered User
    Join Date
    05-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Dynamic range

    Thanks! I've just tried using the function COUNTIF(Range)-1 and it seems to solve the problem as well - but I don't really understand why it is necessary?

  4. #4
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: Dynamic range

    If you post your entire formula I will explain what it's doing and that should clear up your query above.

  5. #5
    Registered User
    Join Date
    05-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Dynamic range

    Sorry adding 1 in the end does indeed work Excel and I are not really good friends today I guess...

  6. #6
    Registered User
    Join Date
    05-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Dynamic range

    Now I've tried adding "1" in the end but it doesn't change anything. Nevertheless using COUNTIF does work, so my formula will be: =OFFSET('Porteføljer '!$A$4;0;0;COUNTIF('Porteføljer '!$A:$A)-1)

    So my only question is: Why is it necessary to use COUNTIF and minus 1 instead of just COUNT (the formula I am using when defining my y-axis)?

    ...I don't know if this question makes any sense at all

  7. #7
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: Dynamic range

    Are you using COUNTIF or COUNTA?

    If COUNTIF then you're missing a bit to the formula.

    If COUNTA then it will work and the -1 at the end discounts the header row in the count.

  8. #8
    Registered User
    Join Date
    05-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Dynamic range

    Hmm, using COUNTIF does work, when I minus 1 after the argument Anyway, everything is running as it's supposed to now, so I'm just going to mark this thread as solved - thanks a lot!

  9. #9
    Registered User
    Join Date
    05-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Dynamic range

    Just wanted to say that I am the one being a complete idiot. I am not using COUNTIF but another formula that I guess translates into COUNTA in English.

    Thank you again (I have added credit)

+ 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