#1   Report Post  
Posted to microsoft.public.excel.misc
JamesBurrows
 
Posts: n/a
Default A real quickie!


Is there a way of Setting an If loop to search for A-Z without doing A
or B or C or D etc.

I have a column of data and it contains varying things in the specific
colum but im trying to pick out only those that have a single letter in
them.

Heres my code below is there an operator i can put instead of ????????

If Worksheets("Line List").Cells(i, "B") = ("A"??????????"Z") Then

Cheers

James


--
JamesBurrows
------------------------------------------------------------------------
JamesBurrows's Profile: http://www.excelforum.com/member.php...o&userid=35101
View this thread: http://www.excelforum.com/showthread...hreadid=549445

  #3   Report Post  
Posted to microsoft.public.excel.misc
JamesBurrows
 
Posts: n/a
Default A real quickie!


Sorry I will try to clarify this.

I have a colum which may look something like this

A
{blank cell}
B
{blank cell}
Today is the Day
{blank cell}
{blank cell}
A
{blank cell}
|I woke up this morning
D

and I want the If loop to be able to say if = (A-Z) IE if it finds a
cell with a single letter in it ie A to Z then......

Hope this helps


--
JamesBurrows
------------------------------------------------------------------------
JamesBurrows's Profile: http://www.excelforum.com/member.php...o&userid=35101
View this thread: http://www.excelforum.com/showthread...hreadid=549445

  #4   Report Post  
Posted to microsoft.public.excel.misc
JamesBurrows
 
Posts: n/a
Default A real quickie!


Sorry I will try to clarify this.

I have a colum which may look something like this

A
{blank cell}
B
{blank cell}
Today is the Day
{blank cell}
{blank cell}
A
{blank cell}
|I woke up this morning
D

and I want the If loop to be able to say if = (A-Z) IE if it finds a
cell with a single letter in it ie A to Z then......

Hope this helps


--
JamesBurrows
------------------------------------------------------------------------
JamesBurrows's Profile: http://www.excelforum.com/member.php...o&userid=35101
View this thread: http://www.excelforum.com/showthread...hreadid=549445

  #5   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK
 
Posts: n/a
Default A real quickie!

Try something like this, assuming you are using column A for your
entries:

=IF(LEN(A1)=1,IF(AND(CODE(UPPER(A1))64,CODE(UPPER (A1))<91),"condition
met",""),"")

adapt the "condition met" message to suit what it is you want to do.
This will check for A to Z and a to z in A1 - remove the UPPER( ) from
the formula to only allow A to Z.

Hope this helps.

Pete

JamesBurrows wrote:
Sorry I will try to clarify this.

I have a colum which may look something like this

A
{blank cell}
B
{blank cell}
Today is the Day
{blank cell}
{blank cell}
A
{blank cell}
|I woke up this morning
D

and I want the If loop to be able to say if = (A-Z) IE if it finds a
cell with a single letter in it ie A to Z then......

Hope this helps


--
JamesBurrows
------------------------------------------------------------------------
JamesBurrows's Profile: http://www.excelforum.com/member.php...o&userid=35101
View this thread: http://www.excelforum.com/showthread...hreadid=549445




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
real number kontraa Excel Discussion (Misc queries) 4 April 3rd 06 12:48 PM
SUNDERA - Real Time Excel Collaboration Aesaes Excel Discussion (Misc queries) 0 March 3rd 06 01:39 PM
How to make excel not round real numbers when making a histogram? Leedawg Charts and Charting in Excel 1 September 21st 05 07:36 PM
Real Value of .UsedRange.Rows.Count dazman Excel Worksheet Functions 2 August 25th 05 03:24 PM
real estate sales template? jodona50 Charts and Charting in Excel 0 August 23rd 05 08:52 PM


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