+ Reply to Thread
Results 1 to 7 of 7

help in making code run faster

  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    help in making code run faster

    hi,

    is possible for my macro code to make it run faster ?

    what the copy button do in the "1 NOOH" excel file do is
    i manually select a num on column E click copy button
    based on the selected num on E it searches on column A
    the same num, if found it copies the corresponding name on column F
    to the num on column A, it goes on until it searches all the num in column A
    then it copies the data to the "1 ST" file starting in A12
    i just select another num in E on "1 NOOH" then click copy again to add others

    what the sort button do in the "1 ST" file is
    it sorts the dates with the same date to its in(am) and out(pm)

    i feel its too slow when i have thousand rows of data to process
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: help in making code run faster

    try this:

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: help in making code run faster

    hi,

    thanks for the code
    how do i copy it instead to just the st excel file?
    i dont need to create a workbook everytime i select a num
    the same idea as my original code

    how do i make the dates on the appended and sorted format "ddd-mmm-dd" (ex Thu-Dec-29) ?

  4. #4
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: help in making code run faster

    amended:

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: help in making code run faster

    hi,

    thanks again
    sorry i was not clear
    how can i select a num click copy then select again another num then click copy (and so on if need be)
    and it just appends the (name,date,in,out) starting in the 2nd empty cell in column A after A12 in the ST file
    (it does not overwrite if there is a previous copied num) same idea as my code

    also the date, after append and sort , in column A in the ST file is formatted as number and not as date
    even after i format the column as date and save the ST file then run again the macro
    it reverts to number format (it shows the date as ex. 475678)

    tried to add the "ThisWorkbook.Activate" before the end sub in the code but does not work
    how can i go back automatically to the NOOH file after i click ok the message box "APPENDED & DATE SORTED"

  6. #6
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: help in making code run faster

    Before you try this, please remove "1 ST" columns(1 to 3) all number formats

    Please Login or Register  to view this content.
    Last edited by ikboy; 01-23-2017 at 05:04 AM.

  7. #7
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: help in making code run faster

    thank you! works great!

+ 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 help making this faster
    By mcsejung in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2016, 06:58 PM
  2. Making a VBA code faster
    By Human2014 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2014, 01:20 PM
  3. making my vba code to autofilter run faster
    By bhupender.bhakuni in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2014, 01:54 AM
  4. VBA ADODB Code...making things faster
    By rameez.bukhari in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-29-2013, 05:26 AM
  5. [SOLVED] Need Help with making copy and paste code faster
    By Wes88 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2012, 10:36 AM
  6. Making Macro Run Faster
    By nalgene5622 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2012, 10:26 AM
  7. Help making code run faster
    By dignityy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2006, 11:42 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