+ Reply to Thread
Results 1 to 6 of 6

Macro to add items with value to another tab

  1. #1
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    298

    Exclamation Macro to add items with value to another tab

    Hi there,

    Can you please help me building a macro that adds items with value in a list to a different tab?

    See attached Example spreadsheet demonstrating in more details.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Macro to add items with value to another tab

    I went with this macro assigned to the button:

    Please Login or Register  to view this content.
    Also attached.

    WBD
    Attached Files Attached Files
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    298

    Re: Macro to add items with value to another tab

    Thanks WBD, but I'm having problems to implement it on my real sheet.

    I tried to reproduce my real spreadsheet with the attached new example, and you can see that after you run the macro, the items and the quantities are in different rows in the "New PO" tab. Can you help me fixing that?

    Also, when I have my real spreadsheet with all the data and formulas, this macro takes around 5 seconds to complete (counter productive when going through hundreds of items). Is there a way to make it faster? I have a similar macro that copy & paste and run super fast, but it does not look at blank cells. The code is:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Macro to add items with value to another tab

    Try this instead:

    Please Login or Register  to view this content.
    WBD

  5. #5
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    298

    Re: Macro to add items with value to another tab

    It's almost good, but the clear contents line is giving me error because columns X and Y are merged.

    Interesting that your first macro did not have this error, so I'm wondering if it is possible to clear contents using the logic in the first code?

    Thank you!

  6. #6
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Macro to add items with value to another tab

    Change this one line to use 2 instead of 1:

    Please Login or Register  to view this content.
    WBD

+ 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 Copy Unique items i>e non duplicated items
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-25-2022, 02:04 PM
  2. Macro to Match Items in Col C
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 05-27-2020, 12:20 PM
  3. [SOLVED] Macro to delete certain items then count remaining items #2
    By elgato74 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-21-2019, 02:26 PM
  4. [SOLVED] Macro to delete certain items then count remaining items
    By elgato74 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-14-2019, 03:20 PM
  5. [SOLVED] Macro to retain only certain items
    By flupsie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2017, 07:00 AM
  6. macro to filter all items in Autofilter except 2+ items
    By DanRiverBrew in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2013, 09:15 PM
  7. Identify Items, Sort those Items, Copy the Items
    By a1981stingray in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2010, 10:50 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