+ Reply to Thread
Results 1 to 9 of 9

copy rows from one sheet to another based formula results

  1. #1
    Registered User
    Join Date
    02-23-2010
    Location
    Sarnia, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    8

    copy rows from one sheet to another based formula results

    Kind of difficult to explain, but I have a report that is run weekly that shows items that have been returned over the last 3 months. The report shows the original date of purchase and the return date, but not the number of days since the purchase and the return. I need to have any items that were returned over 15 days go to a new sheet and display just those rows of information. I am not sure if this is VBA or not. Any help will be greatly appreciated.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: copy rows from one sheet to another based formula results

    Please provide a spreadsheet with some sample data laid out in the format that you have your working spreadsheet. Only a small sample is necessary.


    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    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

  3. #3
    Registered User
    Join Date
    02-23-2010
    Location
    Sarnia, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: copy rows from one sheet to another based formula results

    this is a stripped down version of the report that is run. I would need to copy and paste this data into a separate excel file that would contain the code necessary to complete the task that I require.
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: copy rows from one sheet to another based formula results

    Try this VBA Code:

    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

  5. #5
    Registered User
    Join Date
    02-23-2010
    Location
    Sarnia, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: copy rows from one sheet to another based formula results

    Thank you very much for your assistance. I am not at all familiar with how this code functions but it does not appear to give me what I am looking for. One column shows the product return date (A) and column (L) show when the purchase date was. I need to ensure that the difference between these two cells is great than 15 days. As a side note, if there was a way to display the number of days from purchase date and return date in another column, that would be fantastic!
    Again thank you for your assistance.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy rows from one sheet to another based formula results

    I am not if you want to include days with 15, or only greater than 15(Excluding 15).
    There is button on sheet1
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-23-2010
    Location
    Sarnia, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: copy rows from one sheet to another based formula results

    Thank you AB33 - this worked great! problem solved!

  8. #8
    Registered User
    Join Date
    01-22-2014
    Location
    Compton, whup whup
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: copy rows from one sheet to another based formula results

    Is there a way to solve this problem without vba?

  9. #9
    Registered User
    Join Date
    01-22-2014
    Location
    Compton, whup whup
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: copy rows from one sheet to another based formula results

    Also, I don't understand the code. Which piece determines if the difference is 15 days or more? Thanks.

+ 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] Need VBA or formula that will copy selected rows based on criteria to a new sheet
    By cljohnston64 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2013, 11:43 AM
  2. Copy & paste formula results in successive rows
    By smams in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-20-2012, 02:13 PM
  3. Collapse rows based on IF formula results
    By garyma in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-17-2012, 04:51 PM
  4. Calculate a formula then copy results to new location for several rows
    By Kshorty1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2012, 02:39 PM
  5. [SOLVED] Keyword search, copy rows to new sheet. Results far from consistent
    By Smatths in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-01-2011, 11:11 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