+ Reply to Thread
Results 1 to 11 of 11

Chart that resizes based on result of VLOOKUP

  1. #1
    Registered User
    Join Date
    12-29-2006
    Posts
    8

    Chart that resizes based on result of VLOOKUP

    I have a clustered coulmns chart that i need to resize based on a vlookup of data. The issue is that the data is not the same nymber of rows. They range from 4 to 15. When the value with 4 is selected the charts has 11 blank values. Is there a way to do this so that the chart resizes itself to only what is populated on the lookup table? I know a pivot chart will do this but it does not have a "clean" enough look for the project.

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Lightbulb Re: Chart that resizes based on result of VLOOKUP

    Hello
    I' m not sure what you mean by using Vlookup but take a look at the attached chart example. Is this what you are looking for? You need to create a couple of dymanic named ranges for the Y & X axis and link the chart to them and the row selection in cell H2.

    Hope this helps.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-29-2006
    Posts
    8

    Re: Chart that resizes based on result of VLOOKUP

    Sorry the example you attached did not work for me. It says the a formula in worksheet contains and invalid reference. Attached below is the data i am working with. When the user selects the job they want the chart needs to be able to update based on the lookup lookup value (Analyst1). Chart 1.xlsx

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Chart that resizes based on result of VLOOKUP

    Hi
    Not sure why the attachment didn't work but I've downloaded you Chart. Could you explain what data you want displayed on your chart when a Job number is selected and an Analyst chosen with the Vlookup?

  5. #5
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Chart that resizes based on result of VLOOKUP

    Hi
    I've took a guess at what you might want. See attachment. Hope it loads without reference errors. Not sure what version of Excel you're using but this is in 2007. If you're using 2003 I can do a version of that too if you require.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-29-2006
    Posts
    8

    Re: Chart that resizes based on result of VLOOKUP

    No errors on this file and the layout of the chart is correct. However when i update the job the chart does not change.

  7. #7
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Question Re: Chart that resizes based on result of VLOOKUP

    Hi
    Can you explain what you mean by update the job? Do you mean add data to the 'Data' Sheet?

    DBY

  8. #8
    Registered User
    Join Date
    12-29-2006
    Posts
    8

    Re: Chart that resizes based on result of VLOOKUP

    When i change the value for Job Title on the Chart tab the chart does not update. I see that the from and to update but the chart itself does not update. I am using 2007.

  9. #9
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Chart that resizes based on result of VLOOKUP

    Not sure what the problem is, it works fine on my PC. When you change the job title are the 'From' and 'To' cells changing?

    Sorry just realized you answered that question. Look at the Named ranges JobNo and Value in the Name manager to see if the Index formulas are referencing the correct cells.
    Last edited by DBY; 04-06-2012 at 08:45 AM.

  10. #10
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Chart that resizes based on result of VLOOKUP

    Hi
    Just to clarify these are the formulas you should be seeing:

    Name Manager:

    JobNo' Formula
    =INDEX(data!$A$1:$A$101,Chart!$G$2,1):INDEX(data!$A$1:$A$101,Chart!$H$2,1)

    Value' Formula
    =INDEX(data!$E$1:$E$101,Chart!$G$2,1):INDEX(data!$E$1:$E$101,Chart!$H$2,1)

    Chart Data:

    Value Series Data Formula
    ='Chart 1.xlsx'!Value

    JobNo Series Data Formula
    ='Chart 1.xlsx'!JobNo

  11. #11
    Registered User
    Join Date
    12-29-2006
    Posts
    8

    Re: Chart that resizes based on result of VLOOKUP

    I was just typing up that the Chart data looked off. They had values of [0]!Values and [0]!JobNo. It works perfectly now. Thanks for help much appreciated.

+ 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