+ Reply to Thread
Results 1 to 2 of 2

Double Click Macro that creates new sheet using SQL query (Please Help!!) =)

  1. #1
    Registered User
    Join Date
    11-14-2023
    Location
    Tampa, Florida
    MS-Off Ver
    2021
    Posts
    5

    Double Click Macro that creates new sheet using SQL query (Please Help!!) =)

    Hello, I am still in the process of learning macros, and I was tasked with the following scenario, please help steer me in the right direction!

    I have an excel workbook that is populated with lots of pricing information. Column A is the product_ID and I want column AP to be the lowest competitor price for that product_ID. I also have a SQL table named Competitive_Pricing and a query that uses product_id to pull ALL competitor pricing for that inputted product_ID.


    I would first want to create a macro that populates column AP with the lowest competitor price by plugging in the Product_ID from column A into a query that pulls lowest price for that inputted product_ID, then another macro that when a user double clicks on a cell in column AP (lowest competitor price for that product_id in column A) it creates new sheet. This new sheet would be populated by plugging in Product_ID from column A into my SQL query, pulling all competitor pricing for that specific product_id. Once the user clicks onto a different tab than the created sheet would disappear.

    Can anyone please help me write the VBA code that would be used to do this?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2507 Win 11
    Posts
    24,935

    Re: Double Click Macro that creates new sheet using SQL query (Please Help!!) =)

    crossposted: https://www.mrexcel.com/board/thread...-help.1255405/

    Rule 7: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    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.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future

    However, if you continue to crosspost, you can expect to have your thread BLOCKED until you update it yourself.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. [SOLVED] macro to go to 2nd sheet when you double click on cell
    By jw01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2019, 07:02 PM
  2. [SOLVED] Double Click one sheet and replicate Double Click "mark" on other sheets
    By jeffreybrown in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-14-2018, 08:43 AM
  3. [SOLVED] Macro to Double Click 2 cells to create a copy of a Hidden Sheet.
    By harryco79 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-29-2015, 12:12 PM
  4. Double click cell - copy data to new sheet - create a list from double clicking
    By kakky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-04-2015, 11:14 PM
  5. Changing cell properties with double click, then revert with another double click
    By mweber2525 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-01-2014, 01:40 PM
  6. Copy double-clicked cell to next empty row in different sheet with each double-click
    By erhathaway in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-25-2013, 12:06 AM
  7. Create macro upon double click cell display filter in new sheet
    By kamalhilmi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-14-2012, 07:40 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