Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking up info from chart with multiple catagories How? broderp Excel Worksheet Functions 8 December 11th 06 09:24 PM
edit catagories in chart ? Boswell Charts and Charting in Excel 1 April 27th 06 03:51 AM
i need to get totals in diff catagories Jovetta Excel Worksheet Functions 2 January 5th 06 05:55 PM
break a slice up in my pie chart into sub-catagories aliann Charts and Charting in Excel 1 June 22nd 05 10:14 AM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM


All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"