+ Reply to Thread
Results 1 to 4 of 4

Concatenate Double Quotaion in VBA

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

    Concatenate Double Quotaion in VBA

    Hello:

    I have A1 = 10/17/2019
    A2 = Text as WH
    A3 = Text as WO

    I need VB Code to add Formula in cell A4 to give me 10-17-2019-WHWO

    I tried as below

    Range("A4").Formula = "=TEXT(A1,""MM-DD-YYYY"" & ""-"" & ""A2""&""A3"")"

    Please let me know if you have any questions.
    Thanks.

    Riz

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Concatenate Double Quotaion in VBA

    Your closed bracket should be after the YYYY"" part, and if you had YYYY-"") you wouldn't need the & ""-"" part. I'm not sure why you have any quotes around the A2 and A3.

    Hope this helps.

    Pete

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

    Re: Concatenate Double Quotaion in VBA

    Hello Pete:

    I got it, Thanks a lot

    Riz

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Concatenate Double Quotaion in VBA

    Oh, hello Riz - I didn't notice that it was you that I was replying to.

    Glad to help, and thanks for the rep.

    Pete

+ 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. Double IF Then Concatenate Scenarios
    By MusicJunky in forum Excel General
    Replies: 6
    Last Post: 12-20-2018, 09:45 PM
  2. Concatenate with Double Info in Concatenate Cell
    By MRoz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-10-2015, 02:07 PM
  3. Double click cell - copy data to new sheet - create a list from double clicking
    By kakky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-04-2015, 11:14 PM
  4. Removing double-ups from Concatenate User defined function (UDF)
    By Spicey_888 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2015, 04:57 AM
  5. [SOLVED] Before double click event with if statements (Double clicking blank cell stops bdc firing)
    By camdenpars in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-27-2014, 09:03 AM
  6. Copy double-clicked cell to next empty row in different sheet with each double-click
    By erhathaway in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-25-2013, 12:06 AM
  7. [SOLVED] Concatenate columns, separated by double quotes
    By Felicia in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-20-2005, 03:06 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