LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.scripting.vbscript,microsoft.public.dotnet.languages.vb
external usenet poster
 
Posts: 26
Default Reading SQL Table into Excel and calculating/inserting group line (with VBA)?

Assume I have in a SQL database (Oracle) a table like:

Group Name value1 value2
1 Karl 10 20
1 Paul 3 4
2 Tony 2 0
2 Ben 80 100
2 Peter 1 1
3 ....

Now I want to read this table with VBA and insert it into an Excel sheet.

Moreover after each group a sum line should be calculated and inserted so that the Excel sheet
should look like:

G name V1 V2
1 Karl 10 20
1 Paul 3 4
1 sum 13 24
2 Tony 2 0
2 Ben 80 100
2 Peter 1 1
2 sum 83 101
3 ....
....

How can I code this in VBA ?

Claudia

 
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
Alt + enter is not inserting a line break within a cell in Excel? Mattwpaul Excel Worksheet Functions 1 November 8th 07 06:22 PM
pivot table not reading date formats Todd Excel Worksheet Functions 1 July 20th 06 07:01 PM
Pivot table reports - repeat the group name on each line Excel Excel Discussion (Misc queries) 1 July 10th 06 10:17 PM
excel 'begin a group' menu line color acegap Excel Discussion (Misc queries) 0 April 23rd 06 04:29 PM
line of best fit/reading values from graphs Becky Hutchinson Excel Discussion (Misc queries) 4 December 27th 05 06:16 PM


All times are GMT +1. The time now is 06:28 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"