Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
callum
 
Posts: n/a
Default How do I create a 26 'tier' IF formula?

hi, um, I've been trying to create a 26 tier IF formula so to speak. I would
like to be able to create a formula so that everytime i write a letter, the
corresponding number will be typed in another cell. ie. if i type 'a' the
number '1' will appear, nd so on, ie. a=1 b=2 c=3 etc.

I tried to use an IF formula but of course you can only use seven levels or
'tiers'.

If i could use 26 levels, my formula would look like this:
=IF(K7="A",1,
IF(K7="B",2,
IF(K7="C",3,
IF(K7="D",4,
IF(K7="E",5,
IF(K7="F",6,
IF(K7="G",7,
IF(K7="H",8,
IF(K7="I",9,
IF(K7="J",10,
IF(K7="K",11,
IF(K7="L",12,
IF(K7="M",13,
IF(K7="N",14,
IF(K7="O",15,
IF(K7="P",16,
IF(K7="Q",17,
IF(K7="R",18,
IF(K7="S",19,
IF(K7="T",20,
IF(K7="U",21,
IF(K7="V",22,
IF(K7="W",23,
IF(K7="X",24,
IF(K7="Y",25,
IF(K7="Z",26,))))))))))))))))))))))))))

However, as I said, i could only use seven.
Does anyone have any ideas of other formulas that would give the same effect
as a 26 tier IF formula?

thanks in advance
Callum
  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default How do I create a 26 'tier' IF formula?

Callum,

You don't need an IF statement at all. Use the following formula:

=CODE(A1)-96


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"callum" wrote in message
...
hi, um, I've been trying to create a 26 tier IF formula so to
speak. I would
like to be able to create a formula so that everytime i write a
letter, the
corresponding number will be typed in another cell. ie. if i
type 'a' the
number '1' will appear, nd so on, ie. a=1 b=2 c=3 etc.

I tried to use an IF formula but of course you can only use
seven levels or
'tiers'.

If i could use 26 levels, my formula would look like this:
=IF(K7="A",1,
IF(K7="B",2,
IF(K7="C",3,
IF(K7="D",4,
IF(K7="E",5,
IF(K7="F",6,
IF(K7="G",7,
IF(K7="H",8,
IF(K7="I",9,
IF(K7="J",10,
IF(K7="K",11,
IF(K7="L",12,
IF(K7="M",13,
IF(K7="N",14,
IF(K7="O",15,
IF(K7="P",16,
IF(K7="Q",17,
IF(K7="R",18,
IF(K7="S",19,
IF(K7="T",20,
IF(K7="U",21,
IF(K7="V",22,
IF(K7="W",23,
IF(K7="X",24,
IF(K7="Y",25,
IF(K7="Z",26,))))))))))))))))))))))))))

However, as I said, i could only use seven.
Does anyone have any ideas of other formulas that would give
the same effect
as a 26 tier IF formula?

thanks in advance
Callum



  #3   Report Post  
Chip Pearson
 
Posts: n/a
Default How do I create a 26 'tier' IF formula?

The formula in my reply assumes you are using lower case letters.
For upper case letters, use

=CODE(A1)-64


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Chip Pearson" wrote in message
...
Callum,

You don't need an IF statement at all. Use the following
formula:

=CODE(A1)-96


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"callum" wrote in message
...
hi, um, I've been trying to create a 26 tier IF formula so to
speak. I would
like to be able to create a formula so that everytime i write
a letter, the
corresponding number will be typed in another cell. ie. if i
type 'a' the
number '1' will appear, nd so on, ie. a=1 b=2 c=3 etc.

I tried to use an IF formula but of course you can only use
seven levels or
'tiers'.

If i could use 26 levels, my formula would look like this:
=IF(K7="A",1,
IF(K7="B",2,
IF(K7="C",3,
IF(K7="D",4,
IF(K7="E",5,
IF(K7="F",6,
IF(K7="G",7,
IF(K7="H",8,
IF(K7="I",9,
IF(K7="J",10,
IF(K7="K",11,
IF(K7="L",12,
IF(K7="M",13,
IF(K7="N",14,
IF(K7="O",15,
IF(K7="P",16,
IF(K7="Q",17,
IF(K7="R",18,
IF(K7="S",19,
IF(K7="T",20,
IF(K7="U",21,
IF(K7="V",22,
IF(K7="W",23,
IF(K7="X",24,
IF(K7="Y",25,
IF(K7="Z",26,))))))))))))))))))))))))))

However, as I said, i could only use seven.
Does anyone have any ideas of other formulas that would give
the same effect
as a 26 tier IF formula?

thanks in advance
Callum





  #4   Report Post  
Ragdyer
 
Posts: n/a
Default How do I create a 26 'tier' IF formula?

To add to Chip's fine suggestion, you could use this for either:

=CODE(UPPER(K7))-64

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Chip Pearson" wrote in message
...
The formula in my reply assumes you are using lower case letters.
For upper case letters, use

=CODE(A1)-64


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Chip Pearson" wrote in message
...
Callum,

You don't need an IF statement at all. Use the following
formula:

=CODE(A1)-96


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"callum" wrote in message
...
hi, um, I've been trying to create a 26 tier IF formula so to
speak. I would
like to be able to create a formula so that everytime i write
a letter, the
corresponding number will be typed in another cell. ie. if i
type 'a' the
number '1' will appear, nd so on, ie. a=1 b=2 c=3 etc.

I tried to use an IF formula but of course you can only use
seven levels or
'tiers'.

If i could use 26 levels, my formula would look like this:
=IF(K7="A",1,
IF(K7="B",2,
IF(K7="C",3,
IF(K7="D",4,
IF(K7="E",5,
IF(K7="F",6,
IF(K7="G",7,
IF(K7="H",8,
IF(K7="I",9,
IF(K7="J",10,
IF(K7="K",11,
IF(K7="L",12,
IF(K7="M",13,
IF(K7="N",14,
IF(K7="O",15,
IF(K7="P",16,
IF(K7="Q",17,
IF(K7="R",18,
IF(K7="S",19,
IF(K7="T",20,
IF(K7="U",21,
IF(K7="V",22,
IF(K7="W",23,
IF(K7="X",24,
IF(K7="Y",25,
IF(K7="Z",26,))))))))))))))))))))))))))

However, as I said, i could only use seven.
Does anyone have any ideas of other formulas that would give
the same effect
as a 26 tier IF formula?

thanks in advance
Callum






  #5   Report Post  
pinmaster
 
Posts: n/a
Default How do I create a 26 'tier' IF formula?


Hi,
How about:
=CODE(LOWER(A1))-96

HTH
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=478567



  #6   Report Post  
Cutter
 
Posts: n/a
Default How do I create a 26 'tier' IF formula?


Use this in the cell where you've been trying the IF():

=MOD(CODE(A1),64)

or

=CODE(A1)-64


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=478567

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 can I create a formula for Salutation cs_vision Excel Discussion (Misc queries) 6 October 8th 05 12:31 AM
Create Formula for calculating Little League Age... Brent Excel Worksheet Functions 1 September 21st 05 01:19 AM
How to create specific formula STS Excel Worksheet Functions 4 May 2nd 05 01:44 AM
How do I create a formula that would allow me to subtract from a d Justlearning New Users to Excel 5 January 27th 05 09:47 PM
How do I create a formula in Excel that will countif or sumif bef. bkclark Excel Worksheet Functions 4 November 10th 04 05:30 PM


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

 

ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.