+ Reply to Thread
Results 1 to 2 of 2

Use of Sql within Excel code

  1. #1
    Registered User
    Join Date
    08-30-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    30

    Use of Sql within Excel code

    Hi

    I think I need to use SQL in my VB code as I want to drill through from one spreadsheet to open a new sheet based on criteria from the first.

    So for example, lets say a had a hidden sheet with all the "detail", and my main sheet had 100 records, showing the total spend for each one of 100 schools. Then if I was to click on a school name, a new sheet would open and show the details (lets say spend per month) for that particular school.

    Would an Sql string in the code be the way to go?

    Many thanks

    Ronan

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Use of Sql within Excel code

    It seems to me you could use a pivot table on your data. In a pivot table, you can do exactly what you describe. Look into this. If you need help, can you attach a sample file?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1