+ Reply to Thread
Results 1 to 9 of 9

vba code to convert numer in colulmn D to store as text

  1. #1
    Forum Contributor
    Join Date
    11-18-2014
    Location
    alex
    MS-Off Ver
    excel
    Posts
    135

    vba code to convert numer in colulmn D to store as text

    i want vba code to convert number in column D to store as text

  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: vba code to convert numer in colulmn D to store as text

    Hi,

    Do you really need VBA to do this when you could simply use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    (or however you want any decimal to look) in a helper column, then copy the helper column and paste back as values.
    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
    11-18-2014
    Location
    alex
    MS-Off Ver
    excel
    Posts
    135

    Re: vba code to convert numer in colulmn D to store as text

    i want vba code to store any number as text automatically when i just put data

  4. #4
    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
    52,917

    Re: vba code to convert numer in colulmn D to store as text

    Enter it with a leading '

    You do understand that, once a number is converted to text, it cannot be directly used in a formula after that?
    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

  5. #5
    Forum Contributor
    Join Date
    11-18-2014
    Location
    alex
    MS-Off Ver
    excel
    Posts
    135

    Re: vba code to convert numer in colulmn D to store as text

    Public Sub Pedie()
    Dim rng As Range
    For Each rng In ActiveSheet.UsedRange
    rng.Value = rng.Value
    Next rng
    End Sub

    this code is to made it general but i want to make it as text
    can any one help me with that

  6. #6
    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: vba code to convert numer in colulmn D to store as text

    Quote Originally Posted by sterio View Post
    i want vba code to convert number in column D to store as text
    Can I ask why?

    i.e. What is it about a text number that can't equally be done with the real number?

  7. #7
    Forum Contributor
    Join Date
    11-18-2014
    Location
    alex
    MS-Off Ver
    excel
    Posts
    135

    Re: vba code to convert numer in colulmn D to store as text

    because i have atext box which filter item as i type number but it filter only number which store as text

  8. #8
    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: vba code to convert numer in colulmn D to store as text

    Quote Originally Posted by sterio View Post
    because i have atext box which filter item as i type number but it filter only number which store as text
    Sorry but out of context I don;t understand that statement.

    Can I suggest you upload the workbook and tell us what action you perform and what result you expect and where you expect to see it.

  9. #9
    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
    52,917

    Re: vba code to convert numer in colulmn D to store as text

    it filter only number which store as text
    so can you change how the filter works?

+ 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. Concatenate each cell in column A with Colulmn B and C
    By james19 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2015, 03:04 PM
  2. [SOLVED] Extract text to left of numer
    By cmb80 in forum Excel General
    Replies: 13
    Last Post: 11-05-2014, 12:46 AM
  3. Convert Cell Formula to Convert Text to VBA Code
    By PY_ in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-08-2014, 05:51 PM
  4. Spell Numbers code change needed
    By nasser in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-26-2012, 05:42 AM
  5. Reomving a set numer of characters from a text string
    By ado1963 in forum Excel General
    Replies: 3
    Last Post: 01-10-2006, 10:33 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