Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default group pivot table from external source


Hi everyone, I have an excel pivot-table whose source is an external SQ
server.
I have pulled across all the rows I want, however I want to create
new field that groups the "names" variable.

Is there a way to create a lookup or something in VBA that will grou
the names automatically everytime the data is refreshed?

Thanks for your help.

Scott

--
scottwilson
-----------------------------------------------------------------------
scottwilsonx's Profile: http://www.excelforum.com/member.php...fo&userid=1112
View this thread: http://www.excelforum.com/showthread.php?threadid=27152

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default group pivot table from external source

scottwilsonx wrote ...

Hi everyone, I have an excel pivot-table whose source is an external SQL
server.
I have pulled across all the rows I want, however I want to create a
new field that groups the "names" variable.


I'm assuming you have a column named "names" (consider renaming
because NAMES is vague and a reserved word for future use in SQL
Server).

If you have control over the sql, you could simply make [names] the
first column in your ORDER BY clause e.g.

SELECT
MyKeyCol, MyTextCol, Names
FROM
MyTable
ORDER BY Names, MyTextCol
;

If you do not have control over the sql (e.g. you only have
permissions to run a stored procedure) you could use an ADO recordset
and sort by [names] on the client side.

Post some more details e.g. sql code, example data, required
groupings, etc.

Jamie.

--
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a pivot table be redirected to an external source? KarenK Excel Worksheet Functions 2 May 14th 10 08:52 PM
How do I refresh Pivot Table from an external source ? fbagirov Excel Worksheet Functions 3 November 13th 07 08:58 PM
Selected Columns to be Used in External Data Source in Pivot Table Arj Excel Discussion (Misc queries) 3 February 25th 07 03:17 PM
Pivot Table Data Source external excel file IH Excel Discussion (Misc queries) 4 November 4th 06 02:42 AM
Determine the location of an external source of pivot table? Pivot Novice Excel Worksheet Functions 3 June 1st 05 09:34 PM


All times are GMT +1. The time now is 11:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"