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

I need a function that returns TRUE if its argument (a string) has a leading
apostrophy, otherwise FALSE.

So if A1 contains a then APOS(A1) should return FALSE.
if A1 contains 'a then APOS(A1) should return TRUE.

The difficulty I am having is that the LEN function ignores the apostrophy
and the LEFT function does the same.

Thanks in advance
--
Gary's Student
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Apostrophy Detection

GS,

Use the PrefixCharacter property.

Jim Cone
San Francisco, USA

"Gary's Student" wrote in message
...
I need a function that returns TRUE if its argument (a string) has a leading
apostrophy, otherwise FALSE.
So if A1 contains a then APOS(A1) should return FALSE.
if A1 contains 'a then APOS(A1) should return TRUE.
The difficulty I am having is that the LEN function ignores the apostrophy
and the LEFT function does the same.
Thanks in advance
--
Gary's Student
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Apostrophy Detection

Thanks Jim

Function tickiller2(r As Range) As Boolean
tickiller2 = True
If r.PrefixCharacter = "" Then
tickiller2 = False
End If
End Function

will help me find and remove useless ticks.
--
Gary's Student


"Jim Cone" wrote:

GS,

Use the PrefixCharacter property.

Jim Cone
San Francisco, USA

"Gary's Student" wrote in message
...
I need a function that returns TRUE if its argument (a string) has a leading
apostrophy, otherwise FALSE.
So if A1 contains a then APOS(A1) should return FALSE.
if A1 contains 'a then APOS(A1) should return TRUE.
The difficulty I am having is that the LEN function ignores the apostrophy
and the LEFT function does the same.
Thanks in advance
--
Gary's Student

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Apostrophy Detection

You shouldn't have to worry about them. You already established you can't
detect them with anything but a special property designed for that.

--
Regards,
Tom Ogilvy

"Gary's Student" wrote in message
...
Thanks Jim

Function tickiller2(r As Range) As Boolean
tickiller2 = True
If r.PrefixCharacter = "" Then
tickiller2 = False
End If
End Function

will help me find and remove useless ticks.
--
Gary's Student


"Jim Cone" wrote:

GS,

Use the PrefixCharacter property.

Jim Cone
San Francisco, USA

"Gary's Student" wrote in

message
...
I need a function that returns TRUE if its argument (a string) has a

leading
apostrophy, otherwise FALSE.
So if A1 contains a then APOS(A1) should return FALSE.
if A1 contains 'a then APOS(A1) should return TRUE.
The difficulty I am having is that the LEN function ignores the

apostrophy
and the LEFT function does the same.
Thanks in advance
--
Gary's Student



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Apostrophy Detection

Tom:
I need to worry about them because, even though they are hard to detect,
they are also very fattening. Like candy.

We recently received several workbooks with tick (apostrophy) infestations.
Not only were strings ticked, but many thousands of "empty" cells as well.
The workbooks are 10's of Mbytes big and slow to function. I need to remedy
this situation.
--
Gary's Student


"Tom Ogilvy" wrote:

You shouldn't have to worry about them. You already established you can't
detect them with anything but a special property designed for that.

--
Regards,
Tom Ogilvy

"Gary's Student" wrote in message
...
Thanks Jim

Function tickiller2(r As Range) As Boolean
tickiller2 = True
If r.PrefixCharacter = "" Then
tickiller2 = False
End If
End Function

will help me find and remove useless ticks.
--
Gary's Student


"Jim Cone" wrote:

GS,

Use the PrefixCharacter property.

Jim Cone
San Francisco, USA

"Gary's Student" wrote in

message
...
I need a function that returns TRUE if its argument (a string) has a

leading
apostrophy, otherwise FALSE.
So if A1 contains a then APOS(A1) should return FALSE.
if A1 contains 'a then APOS(A1) should return TRUE.
The difficulty I am having is that the LEN function ignores the

apostrophy
and the LEFT function does the same.
Thanks in advance
--
Gary's Student






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Apostrophy Detection

set rng = Activesheet.UsedRange.SpecialCells(xlConstants,xlT extValues)
for each cell in rng
if len(trim(cell.value)) = 0 then
cell.Clear
end if
Next

--
Regards,
Tom Ogilvy


"Gary's Student" wrote in message
...
Tom:
I need to worry about them because, even though they are hard to detect,
they are also very fattening. Like candy.

We recently received several workbooks with tick (apostrophy)

infestations.
Not only were strings ticked, but many thousands of "empty" cells as well.
The workbooks are 10's of Mbytes big and slow to function. I need to

remedy
this situation.
--
Gary's Student


"Tom Ogilvy" wrote:

You shouldn't have to worry about them. You already established you

can't
detect them with anything but a special property designed for that.

--
Regards,
Tom Ogilvy

"Gary's Student" wrote in

message
...
Thanks Jim

Function tickiller2(r As Range) As Boolean
tickiller2 = True
If r.PrefixCharacter = "" Then
tickiller2 = False
End If
End Function

will help me find and remove useless ticks.
--
Gary's Student


"Jim Cone" wrote:

GS,

Use the PrefixCharacter property.

Jim Cone
San Francisco, USA

"Gary's Student" wrote in

message
...
I need a function that returns TRUE if its argument (a string) has a

leading
apostrophy, otherwise FALSE.
So if A1 contains a then APOS(A1) should return FALSE.
if A1 contains 'a then APOS(A1) should return TRUE.
The difficulty I am having is that the LEN function ignores the

apostrophy
and the LEFT function does the same.
Thanks in advance
--
Gary's Student






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
How do I add an apostrophy to a range of existing cells? stuck Excel Worksheet Functions 3 August 20th 09 02:07 AM
how can I clear an apostrophy in front of number in excel KCESS New Users to Excel 4 September 4th 06 10:39 AM
How can I put an apostrophy next to a number on my Excel workshee. Rabbit Excel Discussion (Misc queries) 5 August 26th 06 08:22 PM
Color detection Dan wilson Excel Worksheet Functions 3 March 31st 05 03:51 PM
add-in detection romes1 Excel Programming 2 November 2nd 04 11:59 PM


All times are GMT +1. The time now is 07:29 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"