+ Reply to Thread
Results 1 to 6 of 6

Concatenate in VBA

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    USA
    MS-Off Ver
    Office365
    Posts
    32

    Concatenate in VBA

    Hi there,
    I'm not good in coding. Appreciate if you could help me in this.
    In excel 2010, column A1:A100 is a serial number where we manually feed numbers.
    I want in A1 through A100 as 1PRAD when i hit numeric 1 in cell A1, 2PRAD when i hit numeric 2 in cell A2 and so forth...how can this be possible

    regards,
    Prad

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Concatenate in VBA

    yes, it is, bau attach a small sample file with data and desired result
    If solved remember to mark Thread as solved

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Concatenate in VBA

    Give a try..

    Select Cell A1:A100,
    Go to Cell Formatting (Ctrl + 1)
    Set Custom Cell Formatting as
    0"PRAD"

    Now start writing Number's in A1:A100
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Concatenate in VBA

    Hi, Prad,

    if you really need a VBA solution, code goes behind the sheet (right click sheet tab, View Code and paste code into CodeWindow):
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  5. #5
    Registered User
    Join Date
    12-12-2012
    Location
    USA
    MS-Off Ver
    Office365
    Posts
    32

    Re: Concatenate in VBA

    It worked fantastic !!!! Thank you so much Debraj and Holger....what a solution!!
    Last edited by meprad; 09-10-2013 at 05:05 AM.

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Concatenate in VBA

    Hi, meprad,

    change the format to #"PRAD".

    Ciao,
    #Holger

+ 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. IF CONCATENATE help
    By Richww2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-22-2011, 04:23 AM
  2. Concatenate
    By caitfox in forum Excel General
    Replies: 4
    Last Post: 06-14-2011, 04:34 AM
  3. Replies: 2
    Last Post: 04-12-2010, 12:35 PM
  4. De-concatenate?
    By KevinMB in forum Excel General
    Replies: 2
    Last Post: 08-30-2005, 01:05 PM
  5. [SOLVED] [SOLVED] I know how to concatenate ,can one de-concatenate to split date?
    By QUICK BOOKS PROBLEM- in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-26-2005, 01:05 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