+ Reply to Thread
Results 1 to 4 of 4

Change cell catagories?

  1. #1
    willz99ta via OfficeKB.com
    Guest

    Change cell catagories?

    Howdy,

    I am trying to change the ActiveCell catagory from Number to Text. Is there
    a quick way to do this in VBA?

    Thanks,
    Will

    --
    Message posted via http://www.officekb.com

  2. #2
    Chip Pearson
    Guest

    Re: Change cell catagories?

    Try

    ActiveCell.NumberFormat = "@"


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "willz99ta via OfficeKB.com" <u6624@uwe> wrote in message
    news:5d338f36895bd@uwe...
    > Howdy,
    >
    > I am trying to change the ActiveCell catagory from Number to
    > Text. Is there
    > a quick way to do this in VBA?
    >
    > Thanks,
    > Will
    >
    > --
    > Message posted via http://www.officekb.com




  3. #3
    willz99ta via OfficeKB.com
    Guest

    Re: Change cell catagories?

    Nope it's still not working. Here is the code I am using right now:

    <code>

    Sub ShortenByTwo()

    Do Until IsEmpty(ActiveCell)
    If Mid(ActiveCell.Value, 1, 1) Like "[A-Za-z]" And Mid(ActiveCell.Value,
    2, 1) Like "[A-Za-z]" Then
    ActiveCell.Value = (Mid(ActiveCell.Value, 3, Len(ActiveCell.Value) -
    2))
    End If
    ActiveCell.NumberFormat = "@"
    ActiveCell.Offset(1, 0).Select
    Loop

    End Sub

    </code>

    Thanks again,
    Will

    --
    Message posted via http://www.officekb.com

  4. #4
    willz99ta via OfficeKB.com
    Guest

    Re: Change cell catagories?

    Thanks I got it working...I needed to the number format before the other jazz

    Thanks,
    Will


    willz99ta wrote:
    >Nope it's still not working. Here is the code I am using right now:
    >
    ><code>
    >
    >Sub ShortenByTwo()
    >
    >Do Until IsEmpty(ActiveCell)
    > If Mid(ActiveCell.Value, 1, 1) Like "[A-Za-z]" And Mid(ActiveCell.Value,
    >2, 1) Like "[A-Za-z]" Then
    > ActiveCell.Value = (Mid(ActiveCell.Value, 3, Len(ActiveCell.Value) -
    >2))
    > End If
    > ActiveCell.NumberFormat = "@"
    > ActiveCell.Offset(1, 0).Select
    >Loop
    >
    >End Sub
    >
    ></code>
    >
    >Thanks again,
    >Will


    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...mming/200603/1

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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