+ Reply to Thread
Results 1 to 2 of 2

MQ - Add dynamic column that adapts to query output

  1. #1
    Registered User
    Join Date
    01-28-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    2

    MQ - Add dynamic column that adapts to query output

    Hello all,

    I developed a code in Microsoft Query and would like to add a dynamic column in the worksheet.
    This column contains a formula which results in 1 if the value in cell A2 is different from the value in A1, if A3 is different from A2, and so on.
    At this moment, I need to drag this formula (=IF(Table_Query_from_CPKD[@[LOCATION_ID]]=A2;0;1)) to the end row of the query output.
    I'd like to automatize this such that this column evolves dynamically along with the output of the query.

    Would this be feasible and yes, how can I implement this please?

    Thanks in advance for your help!

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Re: MQ - Add dynamic column that adapts to query output

    MS-Query returns the data to an Excel Table and Excel Tables should copy down a formula automatically. One suggestion, instead of the table reference try using the cell reference, =IF(A1=A2,0,1)
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. Creating Formula that Adapts to Info Being Pasted into Spreadsheet
    By NDmad in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-21-2016, 09:41 PM
  2. Need output for below input query
    By satyendra21 in forum Excel General
    Replies: 2
    Last Post: 11-17-2015, 06:51 AM
  3. Web Query Output Restriction/Formatting
    By Jimmers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2013, 07:56 AM
  4. Macro output to Excel from SQL query
    By BruceL in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-26-2012, 07:53 PM
  5. Query a database from a range and output results in column next to range
    By gimiv in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2007, 02:16 PM
  6. Query output in Excel
    By Anna in forum Excel General
    Replies: 6
    Last Post: 05-31-2006, 01:15 PM
  7. Web Query output, how to format?
    By kinmorr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2005, 02:10 PM

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