LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default MS Query: Break data into separate sheets based on value?

You propose to query the database for a large (66K+ rows) of data, put
them into a text file, then conditionally query the text file to
create worksheets. Are you sure you can't apply the same logic to
conditionally query the *database* to create the worksheets? Isn't
that the point of having a database i.e. to store *all* the data and
only get the rows you need?!

--

"JB" wrote in message ...
Dick,

Thank you for your reply. Your solution would work except
that my particular situation involves too many unique
values (167+) for it to be feasible. Not to mention the
fact that I don't want to hardcode my values.

I think I'm going to change my strategy to run my query
outside of Excel and dump the data into a large text
file. Then I have a macro that will read in the text file
and create worksheets as needed.

JB

-----Original Message-----
JB

I don't think you can do that and have all the data still

be part of the
same query. However, you could have multiple queries,

one per sheet. If
you have a field that can have one of three values, for

example, you could
create three worksheets and put a query on each sheet

with the appropriate
criteria so as to limit the records for that sheet.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"JB" wrote in

message
...
Hello,

I have a spreadsheet that is populated from an external
source with a database query (ODBC). My problem is that
the query returns too many rows to fit in a single Excel
sheet.

Is there a programmatic way to split up the data into
separate worksheets, based on the value of a particular
column?

I am familiar with macro programming, although I do not
have a lot of experience. If someone could get me

started
in the right direction, I would appreciate it.

TIA,
JB



.



 
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
combining data from two separate sheets [email protected] New Users to Excel 1 October 8th 09 03:40 AM
Pivot Data and Filter on separate sheets Christopher Robin Excel Discussion (Misc queries) 1 July 28th 09 09:04 PM
External data connection needs separate login for each query MikeP Excel Discussion (Misc queries) 1 December 8th 08 07:29 PM
QUERY data range to populate separate worksheet? Greg Purnell[_2_] Excel Worksheet Functions 3 April 5th 07 01:49 PM
Splitting Data into separate sheets bernard Excel Discussion (Misc queries) 0 December 2nd 05 04:31 PM


All times are GMT +1. The time now is 08:04 PM.

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

About Us

"It's about Microsoft Excel"