+ Reply to Thread
Results 1 to 4 of 4

Populate table from database with 2 conditions

  1. #1
    Registered User
    Join Date
    12-10-2013
    Location
    Lancaster, England
    MS-Off Ver
    Excel 2013
    Posts
    3

    Populate table from database with 2 conditions

    Hello guys,

    Hope you will be able to give me a hand. I have a pretty vast database which I populated through VBA from a certain number of worksheets. I now need to create a table which shows min, max and average for each location given x, y or z condition. So far I only approached it by creating a secondary table with each range address and then using INDIRECT, but this would require extra work on the database (insert a function to sort out locations alphabetically and within each Range.Location sort out by conditions (note. A, B and C are not in alphabetic order)) and is also very ugly.
    I was wondering whether you had any more elegant ideas?
    I attached a sample example of my spreadsheet hoping it will help!

    Thank to whoever will spare the time to help me.

    Best,
    Carlo
    Attached Files Attached Files

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

    Re: Populate table from database with 2 conditions

    In the attached workbook, you'll find a new tab named Pivot table.
    This is a great tool from Excel to dispplay reports from a database. It appears that your data are well structured for this tool.
    It is easy to modify. Very versatile. Play with it.
    Attached Files Attached Files
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Populate table from database with 2 conditions

    See Pivot Tab
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-10-2013
    Location
    Lancaster, England
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Populate table from database with 2 conditions

    guys thank you so much, this seems perfect!

    only have on question; in my database I have few ranges (location+conditon) that do not have any data available but when the Pivot Table calculates min and max it returns 0 rather than an error or "no data". can I change this somehow?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Match data between CSV and database and update column in database table
    By djfscouse in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2012, 05:59 PM
  2. Populate matrix using database information?
    By starnz in forum Excel General
    Replies: 3
    Last Post: 07-30-2012, 08:47 PM
  3. Populate Excel report from Database
    By haidermirza in forum Excel General
    Replies: 3
    Last Post: 03-27-2010, 03:40 PM
  4. Populate Drop down box with Access database
    By just66horns in forum Access Tables & Databases
    Replies: 3
    Last Post: 05-11-2009, 02:00 PM
  5. Replies: 0
    Last Post: 02-16-2007, 09:12 AM

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