Solution not required, rather a pointer in the right direction.

Akashwani

Well-known Member
Joined
Mar 14, 2009
Messages
2,911
Good day.

I have set myself a little task!!

I have multiple "Tables" on one sheet and I want to be able to type the "Table Name" or a Defined Name (Named Range) into a cell on another sheet and have that sheet populated with all the data from the relevent "Table" or Defined Range and then produce a chart.

Could you please give me a few "hints" on how I should be looking at solving this?

I'm currently thinking Indirect!

Thanks

Ak
 
Just a nudge, and maybe not much of a nudge at that! Here is how I would approach it:
• On sheet(1) (w/tables), define the range of the table that you want to access
• On sheet(2), use a "With" statement to work with sheet1 stuff and use a copy destination:= to move the defined range
• On sheet(2) with the new data, build your graph with the data just moved
 
Upvote 0
Personally, I would fill my entire sheet with the formula =IFERROR(INDIRECT($A$1),"")

Then in A1 type the name of the range I want to see. You could use data validation to make it a drop down.
 
Upvote 0
Hi nuked.

Thanks for your input.

I tried that method, but I was only getting results from the first Named Range!!
I'm not sure where I was going wrong with it!

I "assumed" that if I typed the name of the Named Range in say A1, put =INDIRECT($A$2) in all the cells that I wanted to display the data, then the sheet would show the relevent data from that Named Range, but it didn't work that way for me.

All Named Ranges are of the same dimensions (X Columns * Y Rows) All Named Ranges and the Data Validation List names all match. I have deleted all the Named Ranges and started from scratch (numerous times) but I still only get data from the first Named Range!!

The VBA solution seems to be the (hassle free) way to go.

Thanks.

Ak
 
Upvote 0
Oops, :oops:

This.....
if I typed the name of the Named Range in say A1

Should have read...
if I typed the name of the Named Range in say A2

Ak
 
Upvote 0
Just as an FYI, I am a coder, so my solutions will always be VBA or Excel's macro language. I don't know diddly about formulas!
 
Upvote 0
James, how I wish I knew just a little bit about VBA!!

Seeing as I have your attention James.

How would you change the following code so that it was based on a List of Named Ranges, rather than Tables?....

Code:
Sub SelectTable()
With ActiveSheet.Shapes(Application.Caller).ControlFormat
    If ActiveSheet.Shapes(Application.Caller).Name = "Drop Down 1" Then
        Worksheets("Dashboard").ChartObjects("Chart 3").Chart.SetSourceData Source:= _
        Range(.List(.Value) & "[#All]")
        Worksheets("Dashboard").ChartObjects("Chart 3").Chart.PlotBy = xlRows
    End If
End With
End Sub

Any ideas?

Thanks

Ak
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top