+ Reply to Thread
Results 1 to 5 of 5

vba to Add comma after 2 digit of time stamp in B:B col untill end of A:A last row value

  1. #1
    Forum Contributor
    Join Date
    06-10-2014
    Location
    CANADA
    MS-Off Ver
    2016
    Posts
    118

    vba to Add comma after 2 digit of time stamp in B:B col untill end of A:A last row value

    Dear experts


    I need help on vba code

    I have run code to add comma after 2 digit but it take too much time to finish b85000 so i want run code depends upon end of last row of A:A col

    assign the sheet name in the code also so helpful it can run from any sheet

    Sub AddComma()

    Dim jesus As Long

    jesus = Cells(Rows.Count, "a").End(xlUp).Row

    Application.ScreenUpdating = False

    Dim cell As Range
    For Each cell In Range("b2:b85000")
    If cell.Value <> "" Then
    cell.Value = Left(cell, Len(cell) - 2) & ":" & Right(cell, 2)
    Else
    End If

    Next cell

    End Sub
    Attached Files Attached Files
    Last edited by MicroTees; 04-24-2015 at 02:37 PM. Reason: attachment

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: vba to Add comma after 2 digit of time stamp in B:B col untill end of A:A last row val

    Here's a crazy idea. Cant' you just replace : with :: ?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-10-2014
    Location
    CANADA
    MS-Off Ver
    2016
    Posts
    118

    Re: vba to Add comma after 2 digit of time stamp in B:B col untill end of A:A last row val

    Its doesnt work..Dude any experts pls help on this?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,670

    Re: vba to Add comma after 2 digit of time stamp in B:B col untill end of A:A last row val

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    Try this
    Please Login or Register  to view this content.
    Last edited by jindon; 04-25-2015 at 09:32 AM.

  5. #5
    Forum Contributor
    Join Date
    06-10-2014
    Location
    CANADA
    MS-Off Ver
    2016
    Posts
    118

    Re: vba to Add comma after 2 digit of time stamp in B:B col untill end of A:A last row val

    Sorry Dude I made mistake of explanation You were right at first code? Solved thanks for being time spend

+ 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. Computer time stamp -> excel time stamp
    By j.petrut in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-27-2014, 05:49 PM
  2. [SOLVED] How to set one digit number behind comma constantly?
    By iqballud in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2014, 04:55 AM
  3. How to get time stamp and user name stamp
    By eskains in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-07-2013, 09:44 AM
  4. Replies: 3
    Last Post: 11-06-2012, 01:37 AM
  5. replace the comma separator to a dot and dot to a comma at the same time
    By barkiny in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2010, 05:42 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