Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Whopper If Statement and Formula to Long

I have a whopper of an If statement and prior to
completion, I received the error that the formula is too
long. Is there any way around this?

Sample before I was cut off:

=MIN(IF(A5=Sheet1!$A$24,45000,Sheet1!$A$24),IF(A5 =Sheet2!
$A$24,45000,Sheet2!$A$24),IF(A5=Sheet3!$A$24,4500 0,Sheet3!
$A$24),IF(A5=Sheet4!$A$24,45000,Sheet4!$A$24),IF
(A5=Sheet5!$A$24,45000,Sheet5!$A$24),IF(A5=Sheet 1!
$A$25,45000,Sheet1!$A$25),IF(A5=Sheet2!$A$25,4500 0,Sheet2!
$A$25),IF(A5=Sheet3!$A$25,45000,Sheet3!$A$25),IF
(A5=Sheet4!$A$25,45000,Sheet4!$A$25),IF(A5=Sheet 5!
$A$25,45000,Sheet5!$A$25),IF(A5=Sheet1!$A$26,4500 0,Sheet1!
$A$26),IF(A5=Sheet2!$A$26,45000,Sheet2!$A$26),IF
(A5=Sheet3!$A$26,45000,Sheet3!$A$26),IF(A5=Sheet 4!
$A$26,45000,Sheet4!$A$26),IF(A5=Sheet5!$A$26,4500 0,Sheet5!
$A$26),IF(A5=Sheet1!$A$27,45000,Sheet1!$A$27),IF
(A5=Sheet2!$A$27,45000,Sheet2!$A$27),IF(A5=Sheet 3!
$A$27,45000,Sheet3!$A$27),IF(A5=Sheet4!$A$27,4500 0,Sheet4!
$A$27),IF(A5=Sheet5!$A$27,45000,Sheet5!$A$27))


Any insights are most appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Whopper If Statement and Formula to Long

Hi Laura
I'd try the following formula
=IF(A5=MIN('sheet1:sheet5'!A24:A30),45000,MIN('sh eet1:sheet5'!A24:A30)
)

if I understood your logic correctly


--
Regards
Frank Kabel
Frankfurt, Germany


Laura wrote:
I have a whopper of an If statement and prior to
completion, I received the error that the formula is too
long. Is there any way around this?

Sample before I was cut off:

=MIN(IF(A5=Sheet1!$A$24,45000,Sheet1!$A$24),IF(A5 =Sheet2!
$A$24,45000,Sheet2!$A$24),IF(A5=Sheet3!$A$24,4500 0,Sheet3!
$A$24),IF(A5=Sheet4!$A$24,45000,Sheet4!$A$24),IF
(A5=Sheet5!$A$24,45000,Sheet5!$A$24),IF(A5=Sheet 1!
$A$25,45000,Sheet1!$A$25),IF(A5=Sheet2!$A$25,4500 0,Sheet2!
$A$25),IF(A5=Sheet3!$A$25,45000,Sheet3!$A$25),IF
(A5=Sheet4!$A$25,45000,Sheet4!$A$25),IF(A5=Sheet 5!
$A$25,45000,Sheet5!$A$25),IF(A5=Sheet1!$A$26,4500 0,Sheet1!
$A$26),IF(A5=Sheet2!$A$26,45000,Sheet2!$A$26),IF
(A5=Sheet3!$A$26,45000,Sheet3!$A$26),IF(A5=Sheet 4!
$A$26,45000,Sheet4!$A$26),IF(A5=Sheet5!$A$26,4500 0,Sheet5!
$A$26),IF(A5=Sheet1!$A$27,45000,Sheet1!$A$27),IF
(A5=Sheet2!$A$27,45000,Sheet2!$A$27),IF(A5=Sheet 3!
$A$27,45000,Sheet3!$A$27),IF(A5=Sheet4!$A$27,4500 0,Sheet4!
$A$27),IF(A5=Sheet5!$A$27,45000,Sheet5!$A$27))


Any insights are most appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Whopper If Statement and Formula to Long

This is array entered Laura, use the Ctrl + Shift + Enter keys, instead of just Enter each time you enter or edit the formula. If
you see { } around it you did it correctly, but you don't type these.

=MIN(IF(Sheet1!A24:A27A5,Sheet1!A24:A27),IF(Sheet 2!A24:A27A5,Sheet2!A24:A27),IF(Sheet3!A24:A27A5, Sheet3!A24:A27),IF(Sheet4!A24:A2
7A5,Sheet4!A24:A27),IF(Sheet5!A24:A27A5,Sheet5!A 24:A27),45000)

The Min function takes up to 30 arguments so you can add a lot more IF's to the above if you need to extend this formula. Even so
it may still get to big so I'd suggest you look at Named ranges.
For example I named this range Sheet1:Sheet5!$A$24:$A$27
to My3D and then I used it to find the MIN like so

=MIN(My3D)

Arrays are not allowed with 3d ranges and there are not to many functions one can use with them.
Anyone know if this has changed for XL 2003?

Anyway the Small or Large function can be used like so (its not mentioned in the Help files)

SMALL(My3D,ROW(A1))

Just fill this down to get a list of the lowest to the highest values from your 3D range.
Use Large to reverse the list. I filled down the Small function from G3:G22 then used this formula to do what the first one does.
(also array entered)

=MIN(IF(G3:G22A5,G3:G22),45000)


Regards Robert

"Laura" wrote in message ...
I have a whopper of an If statement and prior to
completion, I received the error that the formula is too
long. Is there any way around this?

Sample before I was cut off:

=MIN(IF(A5=Sheet1!$A$24,45000,Sheet1!$A$24),IF(A5 =Sheet2!
$A$24,45000,Sheet2!$A$24),IF(A5=Sheet3!$A$24,4500 0,Sheet3!
$A$24),IF(A5=Sheet4!$A$24,45000,Sheet4!$A$24),IF
(A5=Sheet5!$A$24,45000,Sheet5!$A$24),IF(A5=Sheet 1!
$A$25,45000,Sheet1!$A$25),IF(A5=Sheet2!$A$25,4500 0,Sheet2!
$A$25),IF(A5=Sheet3!$A$25,45000,Sheet3!$A$25),IF
(A5=Sheet4!$A$25,45000,Sheet4!$A$25),IF(A5=Sheet 5!
$A$25,45000,Sheet5!$A$25),IF(A5=Sheet1!$A$26,4500 0,Sheet1!
$A$26),IF(A5=Sheet2!$A$26,45000,Sheet2!$A$26),IF
(A5=Sheet3!$A$26,45000,Sheet3!$A$26),IF(A5=Sheet 4!
$A$26,45000,Sheet4!$A$26),IF(A5=Sheet5!$A$26,4500 0,Sheet5!
$A$26),IF(A5=Sheet1!$A$27,45000,Sheet1!$A$27),IF
(A5=Sheet2!$A$27,45000,Sheet2!$A$27),IF(A5=Sheet 3!
$A$27,45000,Sheet3!$A$27),IF(A5=Sheet4!$A$27,4500 0,Sheet4!
$A$27),IF(A5=Sheet5!$A$27,45000,Sheet5!$A$27))


Any insights are most appreciated.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.655 / Virus Database: 420 - Release Date: 09/04/2004


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
Whopper of a Problem Steve Excel Discussion (Misc queries) 3 November 4th 08 02:09 PM
Can't add 7th IF statement to long formula. manxman Excel Worksheet Functions 7 June 8th 06 08:23 AM
sumproduct formula too long, & how to use make an 'OR' statement w creativeops Excel Worksheet Functions 11 January 24th 06 05:05 PM
very long statement Frank Drost Excel Discussion (Misc queries) 0 January 18th 06 08:47 PM
Long IF Statement rmitchell87 Excel Discussion (Misc queries) 2 October 2nd 05 03:50 AM


All times are GMT +1. The time now is 10:08 AM.

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"