Closed Thread
Results 1 to 6 of 6

Using VBA instead of power query

  1. #1
    Registered User
    Join Date
    05-30-2018
    Location
    Los Angeles
    MS-Off Ver
    2016
    Posts
    8

    Using VBA instead of power query

    i had created an excel sheet that took 4 columns of data (week, meal time, meal name, food item) and transposed and grouped that data using power query to create a list of food items, by week (columns) and grouped by meal time/name as rows.

    unfortunately, this was developed for a mac, where Excel for mac wont recognize power query or pivot tools and scripts

    I'm trying to think if I could write VBA code to perform the same function:
    1) Find unique week numbers (column a) and list each as column in result tab
    2.) list meal time/meal names (column b and c, concatenated) as rows
    3.) group food items (column d) into each week column and meal row.

    Columns A-D are in a defined table (Table1), so I can use listobject class as my reference

    Where would I start with this?

    Thank you for your help

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Using VBA instead of power query

    Perhaps a good start would be to attach sample workbooks showing where the data is coming from and what your expected outcome looks like.

    We can then give guidance from there.

    BSB

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Using VBA instead of power query

    Cross Posted : https://www.mrexcel.com/forum/excel-...wer-query.html

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

  4. #4
    Registered User
    Join Date
    05-30-2018
    Location
    Los Angeles
    MS-Off Ver
    2016
    Posts
    8

    Re: Using VBA instead of power query

    Quote Originally Posted by BadlySpelledBuoy View Post
    Perhaps a good start would be to attach sample workbooks showing where the data is coming from and what your expected outcome looks like.

    We can then give guidance from there.

    BSB
    Please see attached test.xlsx for sample workbook that uses power query to transform data from Data tab to Result tab
    Attached Files Attached Files

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Using VBA instead of power query

    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  6. #6
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Using VBA instead of power query

    OP not responded to warning.
    Thread locked.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sub-Forum for Power Query & Power BI?
    By AliGW in forum Suggestions for Improvement
    Replies: 7
    Last Post: 08-26-2018, 05:25 PM
  2. New to Power Query Need to refence a cell for SQL query
    By BSWhipp in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-10-2018, 09:00 AM
  3. Replies: 0
    Last Post: 04-05-2018, 01:16 AM
  4. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 AM
  5. Power Query, Native Query Paramter
    By Kyle123 in forum Excel General
    Replies: 0
    Last Post: 12-08-2017, 09:29 AM
  6. Power Query From Within VBA
    By rabend in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2016, 07:34 AM

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