Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Text formatting

Want macro that will work on a range I select that will look at the contents,
if apostrophe at beginning then no action, if not, it will add so cell
contents are formatted text.
THX
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Text formatting

Scottie,
This should be a start:

Sub Sub1()
Dim s1$, zCell As Range
For Each zCell In Selection
If zCell.PrefixCharacter < "'" Then
s1 = zCell.Value
zCell.Value = "'" & s1
End If
Next zCell
End Sub ' D-C Dave

Scottie wrote:
Want macro that will work on a range I select that will look at the contents,
if apostrophe at beginning then no action, if not, it will add so cell
contents are formatted text.
THX



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
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
Formatting Text in cells that already have text entered Jennifer V. Excel Worksheet Functions 4 January 13th 09 09:27 PM
copying text within a text box and losing formatting hokiefan1us Excel Discussion (Misc queries) 2 September 17th 08 08:41 PM
Formula Text String: Formatting Text and Numbers? dj479794 Excel Discussion (Misc queries) 5 June 30th 07 12:19 AM
Conditional Formatting based on text within a cell w/ text AND num Shirley Excel Worksheet Functions 2 December 22nd 06 01:40 AM
Formatting text in a user form text box DB Excel Programming 0 July 23rd 05 08:09 PM


All times are GMT +1. The time now is 04:24 PM.

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"