+ Reply to Thread
Results 1 to 2 of 2

Macro to auto insert columns

  1. #1
    Registered User
    Join Date
    09-11-2017
    Location
    California
    MS-Off Ver
    Microsoft 2016
    Posts
    1

    Macro to auto insert columns

    Hey All,

    Im searching for a macro that will find matches based off a certain lookup value, and auto insert a row underneath for multiple matches.

    The sheet where the macro will take place will look as such starting with column A: "Sheet1"

    Lookup Values x x x x x x x Return 1 Return 2 x x x x



    This is the sheet that's going to be searched: "Sheet2"
    Lookup Values x I want this I want this x x x x x x x x x x

    I want the macro to search sheet2 for "Lookup values" and return the values in the "I want this" columns (C&D) inside of the "return 1 & 2" columns

    Additionally, where this gets tricky is that some lookup values have MULTIPLE matches. If there are 2 matches I want a row inserted under to accommodate the second match, placing all the return values in the same columns as specified above in 'Sheet1'.

    ***Columns labeled as "x" IN 'SHEET1' contain data that MUST align to the respective lookup value, so it's important that if a new row is inserted due to multiple matches, that the row extends PAST those "x" columns to keep the data aligned**

    Please let me know if I can clarify further!

    MrExcel: https://www.mrexcel.com/forum/excel-...ven-match.html
    Excel Guru: https://www.excelguru.ca/forums/show...4340#post34340
    Last edited by microdmr3796; 09-12-2017 at 01:56 PM. Reason: Cross-Post

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

    Re: Macro to auto insert columns

    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).
    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] Insert rows/columns that auto add formulas
    By bugdout in forum Excel Formulas & Functions
    Replies: 43
    Last Post: 01-22-2017, 04:40 PM
  2. Macro to Auto Insert data
    By xybadog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-17-2013, 06:48 AM
  3. Complex VBA problem auto insert date and time, auto insert comment, etc.
    By rojashan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2013, 09:40 PM
  4. Replies: 2
    Last Post: 07-13-2012, 03:21 AM
  5. Replies: 1
    Last Post: 01-19-2012, 04:34 PM
  6. Auto insert of columns
    By ramsdesk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2007, 07:21 AM
  7. Auto insert date, time & user in columns when data is entered in another column?
    By shelbsassy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2007, 02:59 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