Dynamic Range for Pivot table not working

mad3

Board Regular
Joined
Sep 15, 2009
Messages
130
Office Version
  1. 365
Platform
  1. Windows



I created the following formula for a dynamic range and I get an error when attempting to create my pivot table

=OFFSET(CURRENT!$A$1,0,0,COUNTA(CURRENT!$A:$A),COUNTA(CURRENT!$1:$1))

The error I get is as follows:
This command requires at least two rows of source data. You cannot use this command on a section in only one row.

A few of my columns don't have data...Could that be the problem.

[TABLE="width: 1019"]
<colgroup><col width="64" style="width: 48pt; mso-width-source: userset; mso-width-alt: 2340;" span="2"> <col width="86" style="width: 65pt; mso-width-source: userset; mso-width-alt: 3145;"> <col width="141" style="width: 106pt; mso-width-source: userset; mso-width-alt: 5156;"> <col width="64" style="width: 48pt;"> <col width="176" style="width: 132pt; mso-width-source: userset; mso-width-alt: 6436;"> <col width="109" style="width: 82pt; mso-width-source: userset; mso-width-alt: 3986;"> <col width="226" style="width: 170pt; mso-width-source: userset; mso-width-alt: 8265;"> <col width="64" style="width: 48pt;" span="5"> <col width="106" style="width: 80pt; mso-width-source: userset; mso-width-alt: 3876;"> <tbody>[TR]
[TD="class: xl63, width: 64, bgcolor: transparent"]Ticket Id[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]Alt Ticket Id[/TD]
[TD="class: xl63, width: 86, bgcolor: transparent"]Reference Id[/TD]
[TD="class: xl63, width: 141, bgcolor: transparent"]Ticket Type[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]Status[/TD]
[TD="class: xl63, width: 176, bgcolor: transparent"]Description[/TD]
[TD="class: xl63, width: 109, bgcolor: transparent"]Exch #[/TD]
[TD="class: xl63, width: 226, bgcolor: transparent"]Exch Name[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]Work Order[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]State[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]Task[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]Asset[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]Created On[/TD]
[TD="class: xl63, width: 106, bgcolor: transparent"]Updated By[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK806681[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF Approve - CA 5203379[/TD]
[TD="bgcolor: transparent, align: right"]334[/TD]
[TD="bgcolor: transparent"]CO PALM DESERT[/TD]
[TD="bgcolor: transparent"]5203379[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/19/2017 6:27:55 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]Bernard[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK806226[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF Approve - CA 5211297[/TD]
[TD="bgcolor: transparent, align: right"]335[/TD]
[TD="bgcolor: transparent"]RANCHO CALIFORNIA - 44444[/TD]
[TD="bgcolor: transparent"]5211297[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/19/2017 1:58:53 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]Martinez[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK806217[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF Approve - CA 5216229[/TD]
[TD="bgcolor: transparent, align: right"]331[/TD]
[TD="bgcolor: transparent"]CO OXNARD W WOOLEY[/TD]
[TD="bgcolor: transparent"]5216229[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/19/2017 1:38:16 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]Martinez[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK806210[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF Approve - CA 5205491[/TD]
[TD="bgcolor: transparent, align: right"]333[/TD]
[TD="bgcolor: transparent"]CO POMONA[/TD]
[TD="bgcolor: transparent"]5205491[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/19/2017 1:08:56 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]Martinez[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK806199[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF Approve - CA 5210460[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"]CO WEAVERVILLE[/TD]
[TD="bgcolor: transparent"]5210460[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/19/2017 12:47:56 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]rowland[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK805741[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF Approve - CA 5203118[/TD]
[TD="bgcolor: transparent, align: right"]335[/TD]
[TD="bgcolor: transparent"]SUN CITY[/TD]
[TD="bgcolor: transparent"]5203118[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/18/2017 6:15:14 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]martinez[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK805331[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF APPROVE CA-5211379[/TD]
[TD="bgcolor: transparent, align: right"]335[/TD]
[TD="bgcolor: transparent"]TEMECULA[/TD]
[TD="bgcolor: transparent"]5211379[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/18/2017 2:13:47 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]welter[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK805326[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF APPROVE CA-5211137[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"]CO MIRAMONTE[/TD]
[TD="bgcolor: transparent"]5211137[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/18/2017 2:03:15 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]bush[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK805323[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF APPROVE CA-5210263[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"]GILROY[/TD]
[TD="bgcolor: transparent"]5210263[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/18/2017 1:51:11 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]elms[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK805183[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="class: xl64, bgcolor: transparent"]INF APPROVE CA-5207926[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"]BETHEL/FLORENCE[/TD]
[TD="bgcolor: transparent"]5207926[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/18/2017 1:07:58 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]rowland[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK805174[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF APPROVE CA-5207377[/TD]
[TD="bgcolor: transparent, align: right"]1[/TD]
[TD="bgcolor: transparent"]SANGER[/TD]
[TD="bgcolor: transparent"]5207377[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/18/2017 12:38:00 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]soccer[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]TK803707[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="class: xl64, bgcolor: transparent"]Summary[/TD]
[TD="bgcolor: transparent"]New[/TD]
[TD="bgcolor: transparent"]INF Approve - CA 5214984[/TD]
[TD="bgcolor: transparent, align: right"]331[/TD]
[TD="bgcolor: transparent"]LANCASTER[/TD]
[TD="bgcolor: transparent"]5214984[/TD]
[TD="class: xl64, bgcolor: transparent"]Montana[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]10/17/2017 8:52:24 PM[/TD]
[TD="class: xl64, bgcolor: transparent"]Martinez[/TD]
[/TR]
</tbody>[/TABLE]


Thanks for the help...

Mike


 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hey Mike,

Your formula looks fine - I just tried it & it works no problem.

I've pasted the data you included in your post into my workbook for a test (named the range 'top') & created a Pivot Table using the dataset 'top' with no issues.

Is there anything else?

James
 
Upvote 0
Huh. I will try again when I get home in couple hours. Strange, because I'm doing sone thing wrong.
 
Upvote 0
Thanks, James! Just got to work and tried the formula again. The only thing different, I used a different name for the 'dynamic range'. It worked.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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