Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dan B
 
Posts: n/a
Default Is this possible?....

Greetings...

I have a SQL database I want to pull data from.
The data is company contact information and dollar amounts of insurance
premium.
I want to have the data automatically go into different worksheets based on
the premium amount.

For example, Sheet 1 would be all data, sheet 2 would be premiums under
$10,000, sheet 3 would be premiums from $10,001 to $50,000 and so on.

Can that be done, and where would be a good place to start figuring out how
to do it?

Thanks,
Dan


  #2   Report Post  
Dave R.
 
Posts: n/a
Default

At least with Access databases, you can go to dataimport external datanew
database query and then once you decide what fields to import, you can also
filter records by contents of any field, such as 10000

With this method you'd have to create a new query range on each worksheet,
and only import data that fits what you want on the worksheet.



"Dan B" wrote in message
...
Greetings...

I have a SQL database I want to pull data from.
The data is company contact information and dollar amounts of insurance
premium.
I want to have the data automatically go into different worksheets based

on
the premium amount.

For example, Sheet 1 would be all data, sheet 2 would be premiums under
$10,000, sheet 3 would be premiums from $10,001 to $50,000 and so on.

Can that be done, and where would be a good place to start figuring out

how
to do it?

Thanks,
Dan




  #3   Report Post  
Lynn Arlington
 
Posts: n/a
Default

What about pulling all information then splitting it onto different sheets
using advanced filtering?

Lynn

"Dan B" wrote:

Greetings...

I have a SQL database I want to pull data from.
The data is company contact information and dollar amounts of insurance
premium.
I want to have the data automatically go into different worksheets based on
the premium amount.

For example, Sheet 1 would be all data, sheet 2 would be premiums under
$10,000, sheet 3 would be premiums from $10,001 to $50,000 and so on.

Can that be done, and where would be a good place to start figuring out how
to do it?

Thanks,
Dan



  #4   Report Post  
sebastienm
 
Posts: n/a
Default

To import data, you can use the External Data feature of excel.

1. Import all data:
- in sheet 1, goto menu Data Import (or Get) External Data New Database
Query... the Data Source dialog pops up
- choose the data source by selecting the databse directly or the database
type (eg: MS Access Database)
- locate the database if not done yet
- create the query or select the table / fileds to import
- ...
The data are automaticallly imported to excel
To refresh the query/data at later time, right click the resulting data and
choose the Refresh submenu.

2. To import data within a range of premium, do the same as above in
another sheet, and set the $ limits on the corressponding filed (eg: field
Premium).

Regards,
Sebastien

"Dan B" wrote:

Greetings...

I have a SQL database I want to pull data from.
The data is company contact information and dollar amounts of insurance
premium.
I want to have the data automatically go into different worksheets based on
the premium amount.

For example, Sheet 1 would be all data, sheet 2 would be premiums under
$10,000, sheet 3 would be premiums from $10,001 to $50,000 and so on.

Can that be done, and where would be a good place to start figuring out how
to do it?

Thanks,
Dan



  #5   Report Post  
Jared
 
Posts: n/a
Default

A little more complicated but a betterway to do this would be as follows:
1. Use ADO (or ODBC if you prefer) to connect to the database.
2. Submit a Query such as "Select * from Premium_table where premium<10000
3. Copy this data into sheet1.

You would then repeat this exercise by changing the premium amount in the
where clause so records with a premium between 10000 and 50000 are selected
and then entered into the worksheet.

If ADO, SQL, and VBA are not very familiar to you, try the other suggestions
first. If they are, this is the way to go.

"sebastienm" wrote:

To import data, you can use the External Data feature of excel.

1. Import all data:
- in sheet 1, goto menu Data Import (or Get) External Data New Database
Query... the Data Source dialog pops up
- choose the data source by selecting the databse directly or the database
type (eg: MS Access Database)
- locate the database if not done yet
- create the query or select the table / fileds to import
- ...
The data are automaticallly imported to excel
To refresh the query/data at later time, right click the resulting data and
choose the Refresh submenu.

2. To import data within a range of premium, do the same as above in
another sheet, and set the $ limits on the corressponding filed (eg: field
Premium).

Regards,
Sebastien

"Dan B" wrote:

Greetings...

I have a SQL database I want to pull data from.
The data is company contact information and dollar amounts of insurance
premium.
I want to have the data automatically go into different worksheets based on
the premium amount.

For example, Sheet 1 would be all data, sheet 2 would be premiums under
$10,000, sheet 3 would be premiums from $10,001 to $50,000 and so on.

Can that be done, and where would be a good place to start figuring out how
to do it?

Thanks,
Dan





  #6   Report Post  
Dan B
 
Posts: n/a
Default

Thanks for the help....I'll give it a go and see what happens.





"Dan B" wrote in message
...
Greetings...

I have a SQL database I want to pull data from.
The data is company contact information and dollar amounts of insurance
premium.
I want to have the data automatically go into different worksheets based
on the premium amount.

For example, Sheet 1 would be all data, sheet 2 would be premiums under
$10,000, sheet 3 would be premiums from $10,001 to $50,000 and so on.

Can that be done, and where would be a good place to start figuring out
how to do it?

Thanks,
Dan



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



All times are GMT +1. The time now is 03:10 PM.

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"