Dynamic Named Ranges and Pulling from Data Sheet to rest of Workbook

AlexB123

Board Regular
Joined
Dec 19, 2014
Messages
207
Hi all,

I have seen many advanced spreadsheets that make use of a single Data sheet, where data is only pasted or imported from some data source and drives the rest of the workbook. I have set up a data sheet that records the type of customer, their status (i.e., recent customer, not-recent, returning, etc.), their age, their market segment, and the quantities of visits for each.

I thought that using named ranges would make this easier ... but the data is updated monthly, so the ranges must be dynamic. Currently, my ranges are shifting, and each time I hit 'ctrl+shift+enter' (the array formulas for multiple criterias) an "Update Data" dialog appears.

Should I use named ranges at all? Are dynamic ranges the best choice for data sheets that will be updated regularly? And how can I get my lookups to work? (NOTE: I tested my lookups on the side of my data sheet, without names, and they worked with five criteria)

[TABLE="width: 500"]
<tbody>[TR]
[TD]Type[/TD]
[TD]Status[/TD]
[TD]Age_Grp[/TD]
[TD]Segment[/TD]
[TD]Counts[/TD]
[/TR]
[TR]
[TD]AA[/TD]
[TD]Recent[/TD]
[TD]18-35[/TD]
[TD]Core[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]AA[/TD]
[TD]Regular[/TD]
[TD]36-64[/TD]
[TD]Core[/TD]
[TD]2000[/TD]
[/TR]
[TR]
[TD]AA[/TD]
[TD]Non-Recent[/TD]
[TD]36-64[/TD]
[TD]Outside[/TD]
[TD]1500[/TD]
[/TR]
[TR]
[TD]AB[/TD]
[TD]Recent[/TD]
[TD]65+[/TD]
[TD]Non-Core[/TD]
[TD]2100[/TD]
[/TR]
[TR]
[TD]AB[/TD]
[TD]Expired[/TD]
[TD]<18[/TD]
[TD]Core[/TD]
[TD]3000[/TD]
[/TR]
</tbody>[/TABLE]

And I have defined the ranges as:

Code:
data = Sheet1!A:E
/*also tried data = Sheet1!A1:E3999, data = Sheet1!$A:$E, etc. */
Ctype = Offset(data!$A$1,0,0,Counta(Data!$A:$A),1)
Cstatus = Offset(data!$B$1,0,0,Counta(Data!$B:$B),1)
Cages = Offset(data!$C$1,0,0,Counta(Data!$C:$C),1)
Csgmt = Offset(data!$D$1,0,0,Counta(Data!$D:$D),1)
Ccounts = Offset(data!$E$1,0,0,Counta(Data!$E:$E),1)

And my multiple criteria lookup (on another sheet - Summary) is:
Code:
=Index(data!Ctype, match(1,(indirect(B2)=Cstatus)*(indirect(B3)=Cages)*(indirect(B4)=Csgmt)*(indirect(B5)=Ccounts),0))

=Index(sheet1!$A$1:$A$3999, match(1,B2=sheet1!$B$2:$B$3999)*(B3=$C$2:$C$3999)*(B4=$D2$D$3999)*(B5=$E$2:$E$3999),0))

Please assume that the general syntax is fine ... I am no longer at work and I am not looking at anything, I am just recalling as much as I can. I will update the post tomorrow when I get in to focus on underlying issues.

Thanks,
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I think for the ranges I would go this route.

I copied your sample data into A1.

Data = OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1,5)
Ctype = OFFSET(Data,0,0,,1)
Cstatus = OFFSET(Data,0,1,,1)

You can see the pattern for the rest of them.

Excel Workbook
ABCDE
1TypeStatusAge_GrpSegmentCounts
2AARecent18-35Core1000
3AARegular36-64Core2000
4AANon-Recent36-64Outside1500
5ABRecent65+Non-Core2100
6ABExpiredCore3000
Sheet1
 
Upvote 0
Thank you sir!

I seem to have made a little progress, but as I have LibreOffice/Calc & Linux at home it will be first thing tomorrow before I can continue the debugging process...
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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