+ Reply to Thread
Results 1 to 4 of 4

VB Code to insert formula for Day of the week.

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to insert formula for Day of the week.

    HELLO:

    Please refer to attached file.
    i have date in column A starting from A2.

    I need a VB code to display the day for date in column A.
    For example :
    F2 = TEXT(A2,"Ddd")
    F3 = Text(A3,"Ddd") and so on.

    Let me know if you have any questions.
    Thanks.

    Riz

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: VB Code to insert formula for Day of the week.

    Maybe something like this ?
    (just adapt as required)

    Please Login or Register  to view this content.
    Last edited by GC Excel; 09-14-2014 at 03:21 PM. Reason: correct code
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to insert formula for Day of the week.

    Hi GC Excel:

    Thanks a lot, works great.
    Riz

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VB Code to insert formula for Day of the week.

    Or this.
    [code]
    With Range("F2", Range("A" & Rows.Count).End(xlUp).Offset(,5))
    .Formula = "=TEXT(A2, ""ddd"")"
    .Value = .Value
    End With
    [code]
    If posting code please use code tags, see here.

+ 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. Replies: 4
    Last Post: 04-25-2014, 12:30 PM
  2. VBA formula code for week
    By siobeh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2013, 06:34 AM
  3. [SOLVED] Formula to insert amount if date is in week 3
    By jimstrongy in forum Excel General
    Replies: 3
    Last Post: 05-02-2012, 09:14 AM
  4. Replies: 11
    Last Post: 04-06-2011, 02:33 PM
  5. Insert a new row when week ends / week starts?
    By dvent in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-09-2008, 01:13 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