View Single Post
  #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