#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default IF Statement


Hi there,

Can anyone please help me shorten this IF statement:

=IF((C29=S27),S7,IF((C29=R27),R7,IF((C29=Q27),Q7,I
F((C29=P27),P7,IF((C29=O27),O7,IF((C29=N27),N7,IF(
(C29=M27),M7,IF((C29=L27),L7,IF((C29=K27),K7,IF((C
29=J27),J7,IF((C29=I27),I7,IF((C29=H27),H7,IF((C29
=G27),G7,IF((C29=F27),F7,IF((C29=E27),E7,IF((C29=D
27),D7)))))))))))))))))

The reason why I need this shortening is because Excel says I can only
have 7 IF statements.

Many Thanks,




--
funkeycooldude
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF Statement

It looks like you could just use:
=INDEX(D7:S7,MATCH(C29,D27:S27,0))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"funkeycooldude" wrote in
message . ..

Hi there,

Can anyone please help me shorten this IF statement:

=IF((C29=S27),S7,IF((C29=R27),R7,IF((C29=Q27),Q7,I
F((C29=P27),P7,IF((C29=O27),O7,IF((C29=N27),N7,IF(
(C29=M27),M7,IF((C29=L27),L7,IF((C29=K27),K7,IF((C
29=J27),J7,IF((C29=I27),I7,IF((C29=H27),H7,IF((C29
=G27),G7,IF((C29=F27),F7,IF((C29=E27),E7,IF((C29=D
27),D7)))))))))))))))))

The reason why I need this shortening is because Excel says I can only
have 7 IF statements.

Many Thanks,




--
funkeycooldude



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF Statement

Try this:

=IF(COUNTIF(D27:S27,C29),INDEX(D7:S7,MATCH(C29,D27 :S27,0)),"")


--
Biff
Microsoft Excel MVP


"funkeycooldude" wrote in
message . ..

Hi there,

Can anyone please help me shorten this IF statement:

=IF((C29=S27),S7,IF((C29=R27),R7,IF((C29=Q27),Q7,I
F((C29=P27),P7,IF((C29=O27),O7,IF((C29=N27),N7,IF(
(C29=M27),M7,IF((C29=L27),L7,IF((C29=K27),K7,IF((C
29=J27),J7,IF((C29=I27),I7,IF((C29=H27),H7,IF((C29
=G27),G7,IF((C29=F27),F7,IF((C29=E27),E7,IF((C29=D
27),D7)))))))))))))))))

The reason why I need this shortening is because Excel says I can only
have 7 IF statements.

Many Thanks,




--
funkeycooldude



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
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
If statement Mary Excel Worksheet Functions 2 July 12th 06 04:58 PM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


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