+ Reply to Thread
Results 1 to 3 of 3

Faster way to apply DATEVALUE() to all cells in a column?

Hybrid View

Ragnaros Faster way to apply... 05-22-2014, 05:32 PM
FDibbins Re: Faster way to apply... 05-22-2014, 06:47 PM
alansidman Re: Faster way to apply... 05-22-2014, 06:54 PM
  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    38

    Faster way to apply DATEVALUE() to all cells in a column?

    Is there an easier/faster way to do this?

        Dim rng As Range
    
        For Each rng In ActiveSheet.ListObjects("UpdateStatusTable").DataBodyRange.Rows
            ActiveSheet.Cells(rng.Row, 3) = DateValue(ActiveSheet.Cells(rng.Row, 3))
        Next rng
    There are over 10,000 rows. I want to convert all of the values in column 3 to dates, and for some reason using .NumberFormat isn't working so I'm trying to use DATEVALUE(). Each cell is in the format like 4/25/2014 as is.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,053

    Re: Faster way to apply DATEVALUE() to all cells in a column?

    Try this (no VBA)...

    Hilight the range, select TextToColumns/Next/Next, check Date and select the format you want, click OK
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    24,993

    Re: Faster way to apply DATEVALUE() to all cells in a column?

    another alternative to this is to use Cdate function ---> https://www.udemy.com/blog/vba-cdate/

    but I think the fastest way is to use Ford's solution.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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] Apply a formula to a whole column with empty cells
    By Lija in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-12-2013, 03:27 PM
  2. Replies: 2
    Last Post: 09-02-2011, 03:52 PM
  3. Replies: 2
    Last Post: 04-02-2009, 01:55 AM
  4. apply formula to all cells in a column
    By houston in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-26-2007, 05:03 PM
  5. How to apply a formula to all cells in a column
    By Gillian White in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-29-2006, 04:10 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