+ Reply to Thread
Results 1 to 15 of 15

Hi all, can you please help me to shorten this code as much as possible

  1. #1
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Unhappy Hi all, can you please help me to shorten this code as much as possible

    Please Login or Register  to view this content.
    ---> I want to auto fill L:N range , first delete all the rows which has true values in L column then N column and M column, all one after another and remove auto filter. can somebody please help me out. thanks in advance, it is very important for my project. please guys help me..

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Hi all, can you please help me to shorten this code as much as possible

    Untested

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Hi all, can you please help me to shorten this code as much as possible

    Hi Mike,

    I have tested the code and it is not working it is throwing "Syntax error" can you please look in to it again .i will provide you the whole code please look in to it and make necessary changes. thanks for your help in advance.

    Please Login or Register  to view this content.
    Please look in to it and make necessary changes to shorten the code as much as possible, thanks for your help once again

  4. #4
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Hi all, can you please help me to shorten this code as much as possible

    Hi can some some please do this for me , i want to shorten the code as much as possible . you may use some other codes also but please macro should work like the below code( i mean the sequence of macro) and please test it and post it . thanks in advance... have a great day to you all.....

    Please Login or Register  to view this content.

    Thanks in Advance.....

  5. #5
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Hi all, can you please help me to shorten this code as much as possible

    can some please help me...... thanks in advance..... or let me know if this cannot be short any more.....

  6. #6
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Hi all, can you please help me to shorten this code as much as possible

    can some one help me please......... thanks in advance.....

  7. #7
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Hi all, can you please help me to shorten this code as much as possible

    Hi..

    Attach a Workbook with sample data in it and I will take a look..

    Click on "Go Advanced" to add attachments..

  8. #8
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Hi all, can you please help me to shorten this code as much as possible

    Hi thanks for your interest .... i have uploaded the sheet please see the attached sheet , this is a sample data . the original sheet also looks like similar but with huge data.

    Now coming to my requirement :

    i want all blank rows to get deleted
    i want all unwanted rows with symbols ---- and security in column c to get deleted
    i want all row in D column which starts with UBS to get deleted.
    i want all rows which has value of 0.00001 in column G to get deleted.
    u can write a new code for this also or u can make necessary changes to my code
    i have to write some other codes also that is why i want to shorten the code as much as possible with out effecting the data.
    can u please look in to workbook and do it...thanks in advance for your help......
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Hi all, can you please help me to shorten this code as much as possible

    @boddulus

    Why such a hurry in your questions (you bumped up your question several times), since you got an working solution of your own?
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  10. #10
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Hi all, can you please help me to shorten this code as much as possible

    .... actually i was trying this macro from many days .....it is working as i expected but when i see VBA coding it looks huge.... i tried many ways to shorten it but not able to do it......

  11. #11
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Hi all, can you please help me to shorten this code as much as possible

    Hi..

    The file you posted and tasks you want done to it doesn't really have anything to do with what you wanted in your initial post.. why is that?

    Anyway.. one way of 'cleaning' up that data in the file you just posted could be to replace every cell you don't want with a simple formula (=1 in this case).. and then at the end, delete the entire row of any cell that contains a formula..

    This of course will run into issues if you data does actually contain formulas (your sample data did not though)..

    Please Login or Register  to view this content.
    Attached Files Attached Files

  12. #12
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Hi all, can you please help me to shorten this code as much as possible

    Duplicate Post

  13. #13
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Hi all, can you please help me to shorten this code as much as possible

    Hi Apo
    this is not a duplicate post..... the other post has been deleted by moderator hence i continued in this post.
    the code which you had given did not work for whole sheet if u see the row 28 there is still unwanted data .... please check and let me know...... thanks for your help in advance...... i really appreciate your attempt.......
    can i get a pop up which will ask whether it is ok to delete the data before deleting it,if yes can u please insert that code also.. and please apply this code for whole sheet by giving range.... thanks in advance.....

  14. #14
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Hi all, can you please help me to shorten this code as much as possible



    this is not a duplicate post
    I was referring to fact that my post got duplicated Post #12 was a double up of Post #11).. hence why i replaced the duplicated post with "Duplicate Post".

    What in row 28 indicates that the row should be deleted.. ?

    Example: Is it the fact there is NO value in Column A for that row?.. and if that is so.. row 26 and 27 should be deleted also?

    You need to give as many details as possible..

  15. #15
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Hi all, can you please help me to shorten this code as much as possible

    Oh ..... sorry for confusion,

    after macro running the macro there is still unwanted data left in row 28, please check.

    and can i get a pop up which will ask whether it is ok to delete the data before deleting it,if yes can u please insert that code also.. and please apply this code for whole sheet by giving range.... thanks in advance.....

+ 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] Shorten vba code.
    By satputenandkumar0 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-05-2014, 10:17 AM
  2. [SOLVED] Very inefficient code because of different sizes of arrays, how do i shorten my code?
    By Brammer88 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2012, 04:49 PM
  3. How to shorten the code?
    By joyce_88 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-29-2008, 06:37 PM
  4. Shorten Code?
    By Mhz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2007, 06:18 PM

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