Results 1 to 5 of 5

Code need to be expanded and running faster

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Code need to be expanded and running faster

    Hi I have below code it change the format to text and the date like this DDMMYY. It works ok.
    But if there is blanks or if I set the range so it cover after blanks, it run endless. If there is no blanks and the range is with date it run fast.
    SO this is one of the problems, But also I need it to be expanded so it cover all these columns.
    k2:K10000
    N2:N10000
    AR2:AR10000
    And in top of that I need it to be able to do this in below sheets.
    spain,italy,austria,portugal,france,belgium,netherlands
    So I need to be changed for sure. And also the problem with the speed need to be fixed first.

    Please have a look I have attached a sheet to work with.

    P.s in the test sheet I did not change the sheet name to spain etc. but please do if you want to play with that.

    Thanks in advance

    Abjac

    The code.
    Sub DDMMYYSpain()
    Dim ws As Worksheet
    Dim rCell As Range
    Dim rng As Range
    Set ws = Sheets("spain")
    ws.Select
    Set rng = Application.Range("K2:K10000")
    For Each rCell In rng
        rCell.NumberFormat = "@"
        rCell.Value = Format(rCell.Value, "DDMMYY")
    Next rCell
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Working code need to be expanded to full fill the need.
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2014, 02:19 AM
  2. [SOLVED] Working code need to be expanded to multi search also.
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-12-2014, 12:08 AM
  3. [SOLVED] Running VBA in excel is too slow, how to make it faster?
    By rsbuslon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-14-2013, 05:55 AM
  4. faster running code
    By shortman_alan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-12-2009, 06:08 AM
  5. How to make macro running faster
    By olio39 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-24-2007, 08:13 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