Conditionally copy cells to other sheet then sort and add time-stamp

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • Hi, I am trying to copy certain cells (b,c,d,g)in a row based a quantity in Column G to another sheet...Once in the second sheet it needs to be placed in the next available row, sorted by barcode in column C...and date and timestamped... I will attach my actual sheet "Tool Room List" and sheet 2 is what I need to happen, when Column G has a quantity > 0 entered...

    Thanks in advance for all of your help...

    Joe

  • Re: Macro to Copy, Sort and Paste into new sheet in next row w/Date and timestamp


    Have a look at the workbook attached. Just run the macro called CopyData. The file CopyDataToReportSheet.xlsm clears the report sheet each time it runs. I was unsure if you wanted to keep a running report or just get a fresh report. So I wrote a second workbook called CopyDataToReportSheetRunningReport.xlsm and this retains the previous data and appends to the previous report sheet. I was unsure which you would want. Both reports will sort the data as per the Barcode as requested.
    Hope this helps

  • Re: Conditionally copy cells to other sheet then sort and add time-stamp


    Smuzoen,

    I want to thank you for the time you put forth in the creation of these codes...Both work Flawlessly, and thanks for the optional codes, I hadn't looked that far ahead...So again, thank you, for lookin out!

    You're the greatest!....Thanks

  • Re: Conditionally copy cells to other sheet then sort and add time-stamp


    Smuzoen, I have encounterd a problem while distributing the list...Some of our computers are running Office 2003, and are getting error "Compile error, Varible not defined......SortOn:=xlSortOnValues,".....Code is below........it works like a dream on Office 2007

    Please help...Is this going to be something that I have to be computer specific on...i.e. computers running '07 get one form and the '03 computers get another?

    Thanks again for your time and patience...I really appreciate it...

  • Re: Conditionally copy cells to other sheet then sort and add time-stamp


    When you upload any code to the forum you need to place code tags around your code - have a look at this link http://www.ozgrid.com/forum/misc.php?do=bbcode#code
    It just makes the code easier to read. If you could edit you last post and place the code tags that would be appreciated.
    It is always a pain with having some people running a different version but it does not matter - I have written this so it should work with both 2007 and 2003 - Open the attachment in 2007 and then save as Excel 97-2003 workbook. Save this file as an xls file and you should find it will work with 2007 and 2003
    This is the running report version - If you want the other version converted let me know or you might be able to work it out yourself by comparing the code - if not just yell.

  • Re: Conditionally copy cells to other sheet then sort and add time-stamp


    Sorry about the code post...I had read that and completely forgotten....Thanks for the updated code...it does exactly what it is supposed to...

    Thanks again for all of your help...

  • Re: Conditionally copy cells to other sheet then sort and add time-stamp


    Hello Smuzoen, how can I get your script to input Log information at the top and not the bottom. THANK YOU in Advance!!!!!!!

  • Re: Conditionally copy cells to other sheet then sort and add time-stamp


    sirip,


    Welcome to Ozgrid.


    Please read the forum rules.


    Do not post your questions in threads started by others - this is known as thread hijacking.
    Always start a new thread for *YOUR* questions and , if you find it helpful, you may provide a link to this thread, or any others.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!