Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Function not working quite as required

A brilliant approach, Tom. Why didn't I think of that ...<g

Best wishes Harald
Excel MVP
Followup to newsgroup only please

"Tom Ogilvy" skrev i melding
...
This appears to work as well:

Function ValCat(r As Range)
Dim sVal As String
ValCat = 4
sVal = r.Text
If sVal Like "[A-Z]" Then ValCat = 1
If sVal Like "[A-Z]#" Then ValCat = 3
If sVal Like "[A-Z]##" Then ValCat = 3
If sVal Like "#" Then ValCat = 2
If sVal Like "##" Then ValCat = 2
End Function

--
Regards,
Tom Ogilvy



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Function not working quite as required

Many thanks all, for the suggestions.

Regards.

"Harald Staff" wrote in message
...
A brilliant approach, Tom. Why didn't I think of that ...<g

Best wishes Harald
Excel MVP
Followup to newsgroup only please

"Tom Ogilvy" skrev i melding
...
This appears to work as well:

Function ValCat(r As Range)
Dim sVal As String
ValCat = 4
sVal = r.Text
If sVal Like "[A-Z]" Then ValCat = 1
If sVal Like "[A-Z]#" Then ValCat = 3
If sVal Like "[A-Z]##" Then ValCat = 3
If sVal Like "#" Then ValCat = 2
If sVal Like "##" Then ValCat = 2
End Function

--
Regards,
Tom Ogilvy





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003


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
If function required Ravi Excel Discussion (Misc queries) 5 October 21st 08 01:09 PM
Function required Padraig Excel Discussion (Misc queries) 1 November 6th 07 05:40 PM
Help required with COUNTIF/AND function DAT Excel Worksheet Functions 3 August 3rd 06 07:38 PM
Function not working quite as required Harald Staff[_5_] Excel Programming 0 September 15th 03 01:52 PM
Function not working quite as required Bob Phillips[_5_] Excel Programming 1 September 15th 03 01:43 PM


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