Reference a sheet with dynamic data that doesn't exist (yet)

SB3D

New Member
Joined
Apr 29, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello All, first post!

Situation:
Data is generated externally and a script is exporting this data (and some screenshots) to an existing excel file in which it will automatically create a new sheet (SheetA) to plot the data in.
The data rows in SheetA might vary between 1 or 2000 depending on the day, and the data is not "pivot table proof" yet. In sheet B and C I refer to sheet A for some formula's and pivot tables.

I'm trying to find the easiest way to make use of the data in Sheet A without having to make references to this New Sheet in my formula's and pivot tables every time.

So basically its 3 problems in one
1 The Sheet A I want to reference to doesn't exist yet.
2 The data in sheet A might vary from 1-2000 lines.
3 The data in sheet A is not "pivot table proof" as it doesn't have the correct headers and has some blanks etc.


My current solution:
In Sheet B I refer to the none existing data in SheetA by using Indirect.

=INDIRECT($A$1&"!"&CELL("address";A3))

Where A1 is the name if the sheet that doesnt exist yet. and A3 the cell which I refer to. This works great but as sheet A has 3 columns and might have 2000 rows I need 6000 indirect references just in case the data is there. All other cells ofcourse show #ref

This optimized data in SheetB is the input for the pivot table in SheetC

So Yes it works, if I hit refresh in the pivot table it automatically gets the data from Sheet A, sorts it in sheet B and displays it in the Pivot table in sheetC but I was wondering if there is better strategy to speed things up?

I already tried to create a dynamic range using the name manager for Sheet B but Sheet is not actually that dynamic as it has the 6000 cells with indirect formula's so that's not really working.

Thanks in advance!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I just tried a small version of this. I defined DataRange in Name Manager as =INDIRECT(SheetName&"!$A$1:$J$20"). SheetName points to a cell with "Sheet5" in it. Sheet5 doesn't exist, so when I put =DataRange in the equivalent cells in Sheet4, then I got your #Ref errors. When I created Sheet5 and put some data in it, then it showed in Sheet4. If you want to tidy it up, you could put =iferror(DataRange,"") in the cells in Sheet4.
Any good?
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,872
Members
449,097
Latest member
dbomb1414

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