Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 105
Default Left Function Question Help!

Hi Everyone

I have this formulae in my cell;

=if(left(a1,1)="A",1,if(left(a1,1)="B",2,if(left(a 1,1)="C",
3,...................

and so on.

Question is.. I have to put in 'left(a1,1) each time I give
conditions. Is there other method of making this formulae simpler? so
I don't have to type left(a1,1) =

Thank you for your help in advance.


Regards


James
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Left Function Question Help!

You seem to be allocating a sequential number depending on the first
letter of A1. This formula will do that for you:

=CODE(UPPER(A1))-64

This will allocate 1 for "A" and "a", 2 for "B" and "b", 3 for "C" and
"c" etc up to 26 for "Z" and "z".

Hope this helps.

Pete

On Aug 22, 1:04*am, James8309 wrote:
Hi Everyone

I have this formulae in my cell;

=if(left(a1,1)="A",1,if(left(a1,1)="B",2,if(left(a 1,1)="C",
3,...................

and so on.

Question is.. I have to put in 'left(a1,1) each time I give
conditions. Is there other method of making this formulae simpler? so
I don't have to type left(a1,1) =

Thank you for your help in advance.

Regards

James


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 105
Default Left Function Question Help!

On Aug 22, 10:17*am, Pete_UK wrote:
You seem to be allocating a sequential number depending on the first
letter of A1. This formula will do that for you:

=CODE(UPPER(A1))-64

This will allocate 1 for "A" and "a", 2 for "B" and "b", 3 for "C" and
"c" etc up to 26 for "Z" and "z".

Hope this helps.

Pete

On Aug 22, 1:04*am, James8309 wrote:



Hi Everyone


I have this formulae in my cell;


=if(left(a1,1)="A",1,if(left(a1,1)="B",2,if(left(a 1,1)="C",
3,...................


and so on.


Question is.. I have to put in 'left(a1,1) each time I give
conditions. Is there other method of making this formulae simpler? so
I don't have to type left(a1,1) =


Thank you for your help in advance.


Regards


James- Hide quoted text -


- Show quoted text -


Thanks for your help.

What happens if it is not allocating sequential number? e.g. A = 1 B =
3 C = 2 D = 9 ...etc
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Left Function Question Help!

Well, you could set up a little table somewhere like this:

A 1
B 3
C 2
D 9
etc.

Suppose this is in X1:Y26. Then you can use this formula:

=VLOOKUP(LEFT(UPPER(A1),1),$X$1:$Y$26,2,0)

Again, this treats upper and lower case letters the same. If the
values change, you only need to change the table - no need to adjust
the formula.

Hope this helps.

Pete

On Aug 22, 1:19*am, James8309 wrote:
On Aug 22, 10:17*am, Pete_UK wrote:





You seem to be allocating a sequential number depending on the first
letter of A1. This formula will do that for you:


=CODE(UPPER(A1))-64


This will allocate 1 for "A" and "a", 2 for "B" and "b", 3 for "C" and
"c" etc up to 26 for "Z" and "z".


Hope this helps.


Pete


On Aug 22, 1:04*am, James8309 wrote:


Hi Everyone


I have this formulae in my cell;


=if(left(a1,1)="A",1,if(left(a1,1)="B",2,if(left(a 1,1)="C",
3,...................


and so on.


Question is.. I have to put in 'left(a1,1) each time I give
conditions. Is there other method of making this formulae simpler? so
I don't have to type left(a1,1) =


Thank you for your help in advance.


Regards


James- Hide quoted text -


- Show quoted text -


Thanks for your help.

What happens if it is not allocating sequential number? e.g. A = 1 B =
3 C = 2 D = 9 ...etc- Hide quoted text -

- Show quoted text -


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 to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
Left vs Left$ function Andy Excel Discussion (Misc queries) 5 May 6th 07 04:06 AM
Question for about using IF formula LEFT function at the same time jlandes84 Excel Worksheet Functions 2 December 19th 06 09:00 AM
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION CHAIM Excel Worksheet Functions 1 July 27th 05 09:10 PM
Question about using the right or left formula Jambruins Excel Discussion (Misc queries) 4 July 8th 05 10:15 PM


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