#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Limit on Logic

I am trying to build a logic statement with 11 arguments. We are using Excel
2003 which I am assuming has a limit on 7 such arguments. I've attached my
formula below, how can I bypass these limits?

Thank you

=IF(D2=10,"250",IF(D2=9,"225",IF(D2=8,"200",IF( D2=7,"175",IF(D2=6,"150",IF(D2=5,"125",IF(D2=4 ,"100",IF(D2=3,"75",IF(D2=2,"50",IF(D2=1,"25",I F(D2=0,"0","N/A"))))))))))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Limit on Logic

If D2 will only contain numbers

Try this:
=IF(D2<1,"N/A",MIN(INT(D2)*25,225))

If it may contain text or numbers:
=IF(N(D2)<1,"N/A",MIN(INT(D2)*25,225))

Does that help?
***********
Regards,
Ron

XL2003, WinXP


"Nash13" wrote:

I am trying to build a logic statement with 11 arguments. We are using Excel
2003 which I am assuming has a limit on 7 such arguments. I've attached my
formula below, how can I bypass these limits?

Thank you

=IF(D2=10,"250",IF(D2=9,"225",IF(D2=8,"200",IF( D2=7,"175",IF(D2=6,"150",IF(D2=5,"125",IF(D2=4 ,"100",IF(D2=3,"75",IF(D2=2,"50",IF(D2=1,"25",I F(D2=0,"0","N/A"))))))))))

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Limit on Logic

In general in this sort of logic you'd be better off with a lookup function
(though CHOOSE is probably the best option in this particular case as you're
stepping by 1 each time on your inputs, but as your output increments are
equal see later).
And do you really want to return a text string as the output? If you want
numbers, get rid of the quotes round 225, 200, etc.
And do you want to return the text string "N/A" or return the #N/A error
value?

One option might be =IF(D2<0,NA(),25*INT(MIN(D2,10)))
--
David Biddulph

"Nash13" wrote in message
...
I am trying to build a logic statement with 11 arguments. We are using
Excel
2003 which I am assuming has a limit on 7 such arguments. I've attached my
formula below, how can I bypass these limits?

Thank you

=IF(D2=10,"250",IF(D2=9,"225",IF(D2=8,"200",IF( D2=7,"175",IF(D2=6,"150",IF(D2=5,"125",IF(D2=4 ,"100",IF(D2=3,"75",IF(D2=2,"50",IF(D2=1,"25",I F(D2=0,"0","N/A"))))))))))



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Limit on Logic

Nash13 wrote...
I am trying to build a logic statement with 11 arguments. We are
using Excel 2003 which I am assuming has a limit on 7 such arguments.
I've attached my formula below, how can I bypass these limits?

....
=IF(D2=10,"250",IF(D2=9,"225",IF(D2=8,"200",IF (D2=7,"175",IF(D2=6,"150",IF(D2=5,"125",IF(D2= 4,"100",IF(D2=3,"75",IF(D2=2,"50",IF(D2=1,"25", IF(D2=0,"0","N/A"))))))))))


Logically, you should use a lookup for this.

=LOOKUP(D2,{-1E307,"N/A";0,"0";1,"25";2,"50";3,"75";4,"100";5,"125";
6,"150";7,"175";8,"200";9,"225";10,"250"})

or, since there's a pattern here,

=TEXT(MIN(10,ROUNDUP(D2,0))*25,"0;""N/A""")

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Limit on Logic

Harlan Grove wrote...
....
=TEXT(MIN(10,ROUNDUP(D2,0))*25,"0;""N/A""")


Screwed that up. Make that

=TEXT(MIN(10,INT(D2))*25,"0;""N/A""")



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,290
Default Limit on Logic


=MIN(D2*25,250)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Nash13"
wrote in message
I am trying to build a logic statement with 11 arguments. We are using Excel
2003 which I am assuming has a limit on 7 such arguments. I've attached my
formula below, how can I bypass these limits?

Thank you

=IF(D2=10,"250",IF(D2=9,"225",IF(D2=8,"200",IF( D2=7,"175",IF(D2=6,"150",IF(D2=5,"125",IF(D2=4 ,"100",IF(D2=3,"75",IF(D2=2,"50",IF(D2=1,"25",I F(D2=0,"0","N/A"))))))))))

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
J J is offline
external usenet poster
 
Posts: 9
Default How to have Vlookup find EXACT alpha letter

Tuesday Eve

Using this formula:

=IF(J8="@",J8,IF(J8=".",J8,VLOOKUP(J8,table1,2,FAL SE)))

J8 has a single alpha character

table1 is two columns
column 1 is letters a-z, and A-Z
column 2 is the corrosponding ACII code

The formula is NOT returning an exact match.

How do I make if so?

I have tried sorting column 1 different ways.

Help me Rhonda, Help, Help me Rhonda

J
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How to have Vlookup find EXACT alpha letter

The formula is NOT returning an exact match.

That's because to VLOOKUP "a" and "A" are the same, it's not case sensitive.
So, whichever is listed in the table first is the one VLOOKUP will "find".
This is where "exact match" doesn't really mean exact match!

Assuming that J8 will contain only the letters a-z, A-Z, "@" or "dot", try
this (no lookup table needed):

=IF(OR(J8={"@","."}),J8,CODE(J8))

--
Biff
Microsoft Excel MVP


"J" wrote in message
...
Tuesday Eve

Using this formula:

=IF(J8="@",J8,IF(J8=".",J8,VLOOKUP(J8,table1,2,FAL SE)))

J8 has a single alpha character

table1 is two columns
column 1 is letters a-z, and A-Z
column 2 is the corrosponding ACII code

The formula is NOT returning an exact match.

How do I make if so?

I have tried sorting column 1 different ways.

Help me Rhonda, Help, Help me Rhonda

J



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Limit on Logic

Short and to the point. Thanks much.

Thanks to everyone else who posted as well, it is appreciated.

"Jim Cone" wrote:


=MIN(D2*25,250)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Nash13"
wrote in message
I am trying to build a logic statement with 11 arguments. We are using Excel
2003 which I am assuming has a limit on 7 such arguments. I've attached my
formula below, how can I bypass these limits?

Thank you

=IF(D2=10,"250",IF(D2=9,"225",IF(D2=8,"200",IF( D2=7,"175",IF(D2=6,"150",IF(D2=5,"125",IF(D2=4 ,"100",IF(D2=3,"75",IF(D2=2,"50",IF(D2=1,"25",I F(D2=0,"0","N/A"))))))))))


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Limit on Logic

Short and to the point. Thanks much.

Thanks to everyone else who posted as well, it is appreciated.

"Jim Cone" wrote:


=MIN(D2*25,250)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Nash13"
wrote in message
I am trying to build a logic statement with 11 arguments. We are using Excel
2003 which I am assuming has a limit on 7 such arguments. I've attached my
formula below, how can I bypass these limits?

Thank you

=IF(D2=10,"250",IF(D2=9,"225",IF(D2=8,"200",IF( D2=7,"175",IF(D2=6,"150",IF(D2=5,"125",IF(D2=4 ,"100",IF(D2=3,"75",IF(D2=2,"50",IF(D2=1,"25",I F(D2=0,"0","N/A"))))))))))




  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Limit on Logic

Another option is to use vlookup:
=IF(ISBLANK(D2),"-",VLOOKUP(D2,{0,0;1,25;2,50;3,75;4,100;5,125;6,150 ;7,175;8,200;9,225;10,250},2))

Note that ".." should not be wrapped around numbers in formulas as this will
result in text numbers rather than real numbers.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Nash13" wrote:
I am trying to build a logic statement with 11 arguments. We are using Excel
2003 which I am assuming has a limit on 7 such arguments. I've attached my
formula below, how can I bypass these limits?

Thank you

=IF(D2=10,"250",IF(D2=9,"225",IF(D2=8,"200",IF( D2=7,"175",IF(D2=6,"150",IF(D2=5,"125",IF(D2=4 ,"100",IF(D2=3,"75",IF(D2=2,"50",IF(D2=1,"25",I F(D2=0,"0","N/A"))))))))))

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Limit on Logic

Max wrote...
....
Note that ".." should not be wrapped around numbers in formulas as
this will result in text numbers rather than real numbers.

....

And you read the OP's mind to determine he wants actual numbers rather
than text? Or are you just being patronizing, assuming that the OP is
as ignorant of the distinction between numeric text strings and
numeric values as s/he apparently is of lookup functions?

  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Limit on Logic

No need to pour on the acidics.
It was just an observation point to the OP
based on the OP's formula that was posted
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Harlan Grove" wrote in message
ups.com...
Max wrote...
...
Note that ".." should not be wrapped around numbers in formulas as
this will result in text numbers rather than real numbers.

...

And you read the OP's mind to determine he wants actual numbers rather
than text? Or are you just being patronizing, assuming that the OP is
as ignorant of the distinction between numeric text strings and
numeric values as s/he apparently is of lookup functions?



  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Limit on Logic

"Max" wrote...
No need to pour on the acidics.
It was just an observation point to the OP
based on the OP's formula that was posted

....

Not acidics, reasoned observation.

"Note that ".." should not be wrapped around numbers in formulas as
this will result in text numbers rather than real numbers."

can only be interpreted as patronizing.

"Note: wrapping double quotes around numbers makes them text, so the
formula's result would effectively be treated as numeric zero by most
numeric formulas referring to it."

is neutral. Your use of 'should' makes all the difference. Or do you
have a tenuous grip on English usage?

  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Limit on Logic

"Harlan Grove" wrote
Not acidics, reasoned observation.

Undoubtedly, but expressed in an acidic manner

"Note that ".." should not be wrapped around numbers in formulas as
this will result in text numbers rather than real numbers."
can only be interpreted as patronizing.

By you, you mean? To be honest, I wasn't aware of that possible construence.

.. Your use of 'should' makes all the difference.

To you, you mean. I'm sorry if using "should" somehow stroked you the wrong
way up here.

"Note: wrapping double quotes around numbers makes them text, so the
formula's result would effectively be treated as numeric zero by most
numeric formulas referring to it."
is neutral.

An alternative way to express it, Fair enough.
That it is neutral or not is debatable.

Or do you have a tenuous grip on English usage?

Better than tenuous, I'd say. But I choose to express it in pleasant
English.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




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
I Then logic help robnet Excel Worksheet Functions 4 July 13th 07 10:08 PM
If Then logic not enough workerbeeVAB Excel Discussion (Misc queries) 4 January 5th 06 05:24 PM
IRR Logic Carrie Excel Worksheet Functions 2 November 18th 05 08:59 PM
Nested IF limit or Open parentheses limit Fred Excel Discussion (Misc queries) 5 December 23rd 04 03:34 PM
IF THEN LOGIC flotowntiger Excel Discussion (Misc queries) 5 December 7th 04 12:12 AM


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"