+ Reply to Thread
Results 1 to 4 of 4

Converting excel formula to VBA

  1. #1
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Converting excel formula to VBA

    Hi,

    I need to convert the below formula to work in VBA. Can some nice person help me with this please!!!

    ="Week of "&TEXT(D2+1-WEEKDAY(D2,2),"dd-mmm")&" to "&TEXT(D2+5-WEEKDAY(D2,2),"dd-mmm")


    I put that formula in B2 and the output is like this...... Week of 02-Jan to 06-Jan................. where there are dates in column D2


    Thanks in advance.
    Ash

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Converting excel formula to VBA

    Hi,

    If you want the formula in the cell then

    Please Login or Register  to view this content.
    If you want just the result of the formula then

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    08-23-2016
    Location
    India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    194

    Re: Converting excel formula to VBA

    I wanted it in the cell and this works PERFECT!!!!

    Thank you Richard !

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Converting excel formula to VBA

    My pleasure and thanks for the rep.

+ 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. Converting google sheets formula to excel
    By coldeskimo in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-08-2016, 08:41 AM
  2. Converting Long If Then Excel Formula to VBA
    By KD Gordon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2013, 04:05 AM
  3. Converting Excel formula into VBA code
    By ashraf999 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-22-2012, 05:38 AM
  4. Converting Excel 2007 formula to work in Excel 2003
    By Fastd in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-13-2011, 07:44 PM
  5. Converting excel formula to VBA
    By donyc in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-17-2011, 06:25 PM
  6. Converting excel formula to math formula.
    By Icenor in forum Excel General
    Replies: 3
    Last Post: 10-19-2009, 03:48 PM
  7. converting formula from lotus.123 to excel
    By zaharah in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-27-2005, 10:04 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