+ Reply to Thread
Results 1 to 9 of 9

Excel 2007 : Specify Chart Data Range using an IF Formula

Hybrid View

  1. #1
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Specify Chart Data Range using an IF Formula

    Here's a formula approach which is "semi-automatic".

    The graph derives its data from a common area which is large enough to cope with the larger ranges (coloured green). A simple IF statement determines where to get the data from to go into that common area, i.e. in G16:

    =IF($C$4="Area",G10,C10)

    I have arranged the data vertically so that it can be filtered more easily, so this formula is not just copied across or down. In the 5th row, the formula in G20 is this:

    =IF($C$4="Area",K10,"")

    which returns a blank if Region is selected in the drop-down in C4. This is slightly different in H20:

    =IF($C$4="Area",K11,NA())

    which returns the error #N/A if Region is selected, and the graph will ignore this.

    So, the graph is set up to show the data by Area, but if you select Region in C4 the graph automatically shows only the 4 regions. The graph will not expand automatically, though - you will need to use the filter drop-down in cell I15 and unselect #N/A.If you then change C4 back to Area, though, you will have to use the filter drop-down to Select All - hence the reason for classing this as "semi-automatic".

    Hope this helps.

    Pete
    Attached Files Attached Files
    Last edited by Pete_UK; 06-20-2012 at 08:49 PM.

+ 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