Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 231
Default More then 7 nested If functions.

This is my current formula:

=((Z6+(IF(C6="P",(AB$41+AB$27),IF(C6="B",(AB$48+AB $118),IF(C6="T",(AB$43+AB$18),IF(C6="DT",(AB$8+AB$ 18),IF(C6="ST",(AB$49+AB$119),IF(C6="AT1",(AB$30+A B$6),IF(C6="AT2",(AB$28+AB$11),IF(C6="DC",(AB$30+A B$11+AB$119),0)))))))))))

I need to add one more if function in this formula. What is the recommended
formula i should use. I would love to put this in a macro but not sure how i
should go about doing this.

Please advise

--
sarah
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default More then 7 nested If functions.

Will C6 *ALWAYS* match one of the letter codes?

One way:

=Z6+CHOOSE(MATCH(C6,{"P","B","T","DT","ST","AT1"," AT2","DC","xx"},0),
AB$41+AB$27,AB$48+AB$118,AB$43+AB$18,AB$8+AB$18,AB $49+AB$119,
AB$30+AB$6,AB$28+AB$11,AB$30+AB$11+AB$119,range_fo r_xx)

Or, make a list of the letter codes in a range of cells, say, A1:A9, then:

=Z6+CHOOSE(MATCH(C6,A1:A9,0),AB$41+AB$27,AB$48+AB$ 118,
AB$43+AB$18,AB$8+AB$18,AB$49+AB$119,AB$30+AB$6,
AB$28+AB$11,AB$30+AB$11+AB$119,range_for_A9)

Biff

"sarah" wrote in message
...
This is my current formula:

=((Z6+(IF(C6="P",(AB$41+AB$27),IF(C6="B",(AB$48+AB $118),IF(C6="T",(AB$43+AB$18),IF(C6="DT",(AB$8+AB$ 18),IF(C6="ST",(AB$49+AB$119),IF(C6="AT1",(AB$30+A B$6),IF(C6="AT2",(AB$28+AB$11),IF(C6="DC",(AB$30+A B$11+AB$119),0)))))))))))

I need to add one more if function in this formula. What is the
recommended
formula i should use. I would love to put this in a macro but not sure
how i
should go about doing this.

Please advise

--
sarah



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default More then 7 nested If functions.

Another option:

Make a 2 column list with the letter codes in the left column and the
corresponding addition formulas in the right column:

Then:

=Z6+VLOOKUP(C6,A1:B9,2,0)

Biff

"T. Valko" wrote in message
...
Will C6 *ALWAYS* match one of the letter codes?

One way:

=Z6+CHOOSE(MATCH(C6,{"P","B","T","DT","ST","AT1"," AT2","DC","xx"},0),
AB$41+AB$27,AB$48+AB$118,AB$43+AB$18,AB$8+AB$18,AB $49+AB$119,
AB$30+AB$6,AB$28+AB$11,AB$30+AB$11+AB$119,range_fo r_xx)

Or, make a list of the letter codes in a range of cells, say, A1:A9, then:

=Z6+CHOOSE(MATCH(C6,A1:A9,0),AB$41+AB$27,AB$48+AB$ 118,
AB$43+AB$18,AB$8+AB$18,AB$49+AB$119,AB$30+AB$6,
AB$28+AB$11,AB$30+AB$11+AB$119,range_for_A9)

Biff

"sarah" wrote in message
...
This is my current formula:

=((Z6+(IF(C6="P",(AB$41+AB$27),IF(C6="B",(AB$48+AB $118),IF(C6="T",(AB$43+AB$18),IF(C6="DT",(AB$8+AB$ 18),IF(C6="ST",(AB$49+AB$119),IF(C6="AT1",(AB$30+A B$6),IF(C6="AT2",(AB$28+AB$11),IF(C6="DC",(AB$30+A B$11+AB$119),0)))))))))))

I need to add one more if function in this formula. What is the
recommended
formula i should use. I would love to put this in a macro but not sure
how i
should go about doing this.

Please advise

--
sarah





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
Is there any way around the maximum of seven nested functions? Nakia Allen Excel Worksheet Functions 5 July 14th 06 12:49 PM
nested if functions in Excel 2002 Darin Gibson Excel Worksheet Functions 8 November 22nd 05 07:51 PM
limit of 7 nested functions? Olympiad Excel Worksheet Functions 3 May 28th 05 07:47 AM
how do I use multiple nested functions? TeeJay Excel Worksheet Functions 3 February 20th 05 05:09 PM
ENTER EXCEL FORMULA WITH MORE THAN 7 NESTED FUNCTIONS Linda Bolton Excel Worksheet Functions 2 January 14th 05 11:58 AM


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