+ Reply to Thread
Results 1 to 3 of 3

VBA copy based on a range (message box / user form) and copy values greater than 0

  1. #1
    Registered User
    Join Date
    12-05-2013
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    19

    VBA copy based on a range (message box / user form) and copy values greater than 0

    Hello,

    I need your help to create a macro. I attach an excel file with 3 different worksheets.

    In the first worksheet you can find a forecast, with weekly figures.

    Now, I want to copy data from worksheet "Forecast" based on a selected week, and paste the figures into worksheet "Volume per shipment"

    The user, should have the possibility to select based on a message box / drop down list / user form, the week number from worksheet "Forecast" Range C3 : BB3 and to copy the selected week in worksheet "Volume per shipment" cell C3.

    Also, to copy the part numbers and part description that belongs to the selected week, and to copy only the part numbers that have a value greater than 0 (zero).

    In the attached file, I have marked with yellow the result that I want to achieve with a macro.

    Thank you!
    Madi
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    1,335

    Re: VBA copy based on a range (message box / user form) and copy values greater than 0

    It is not clear what the par desc sheet has to do with the Macro request, can you elaborate?

  3. #3
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    860

    Re: VBA copy based on a range (message box / user form) and copy values greater than 0

    Hello Madi,

    See if the following does the task for you:-

    In a standard module, place this code:-

    Please Login or Register  to view this content.
    In the "Volume per shipment" sheet module, place this code:-

    Please Login or Register  to view this content.
    This will allow you to select a week value from a drop down list in C3 of the "Volume per shipment" sheet and the required values will instantly be transferred over from the "Forecast" sheet.
    There are a few notes for you in the "Volume per shipment" sheet as well.

    I hope that this helps.

    Cheerio,
    vcoolio.

    I've attached your sample workbook with codes implemented.
    Attached Files Attached Files

+ 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] Copy Sheets to another Workbook based on MultiSelect User Form
    By nobodyukno in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-23-2019, 11:29 AM
  2. Replies: 3
    Last Post: 08-22-2018, 06:42 PM
  3. [SOLVED] Copy Values in User Form to Specific Cells
    By FallingDown in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-15-2016, 06:04 AM
  4. [SOLVED] text box data in a user form copy to a range in sheet 3
    By 9599lorenzo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2015, 09:22 AM
  5. Replies: 1
    Last Post: 02-12-2014, 05:29 AM
  6. [SOLVED] Copy Rows To Predefined Sheet Based on Date Range Using Form or Message Box
    By Isacc in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 02-06-2013, 09:25 AM
  7. Copy-Paste Value based on user defined range
    By tushargarg729@yahoo.com in forum Excel General
    Replies: 0
    Last Post: 02-24-2005, 04:06 PM

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