Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Turi
 
Posts: n/a
Default 7+ nested if statement?

I currently have created an if statement with 7 nested if statements. I now
need to add another if statement, but there is a limit of 7 nested
statements. Is there a work around.

My issue is that I want to copy the # in cell B1 to cell C1 only if cell A1
matches one of the 8 values in column D (D1:D8), if not return a value of 0.

The if statement worked for 7 values, but now I have 8. Please help
Thanks!
  #2   Report Post  
Nitin Harkawat
 
Posts: n/a
Default

More than one ways of doing it , Use countif or vlookup or sumif etc
Here is one way
On cell C1 type
=IF(OR(A1=d1:d8)=TRUE,A1,0)
array entered (Ctrl+shift+enter)

"Turi" wrote in message
...
I currently have created an if statement with 7 nested if statements. I
now
need to add another if statement, but there is a limit of 7 nested
statements. Is there a work around.

My issue is that I want to copy the # in cell B1 to cell C1 only if cell
A1
matches one of the 8 values in column D (D1:D8), if not return a value of
0.

The if statement worked for 7 values, but now I have 8. Please help
Thanks!



  #3   Report Post  
Dave R.
 
Posts: n/a
Default

In C1, try something like;

=--(COUNTIF($D$1:$D$8,A1)0)*B1

or
=IF(COUNTIF($D$1:$D$8,A1)0,B1,0)



"Turi" wrote in message
...
I currently have created an if statement with 7 nested if statements. I

now
need to add another if statement, but there is a limit of 7 nested
statements. Is there a work around.

My issue is that I want to copy the # in cell B1 to cell C1 only if cell

A1
matches one of the 8 values in column D (D1:D8), if not return a value of

0.

The if statement worked for 7 values, but now I have 8. Please help
Thanks!



  #4   Report Post  
Jason Morin
 
Posts: n/a
Default

Try this instead:

=IF(ISNA(MATCH(A1,D1:D8,0)),0,B1)

HTH
Jason
Atlanta, GA

-----Original Message-----
I currently have created an if statement with 7 nested

if statements. I now
need to add another if statement, but there is a limit

of 7 nested
statements. Is there a work around.

My issue is that I want to copy the # in cell B1 to cell

C1 only if cell A1
matches one of the 8 values in column D (D1:D8), if not

return a value of 0.

The if statement worked for 7 values, but now I have 8.

Please help
Thanks!
.

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
Mini-editor for nested IF's in Excel Erik Neu Excel Discussion (Misc queries) 3 January 5th 05 12:30 AM
IF Statement with Average Function results in #Value! Paul Excel Discussion (Misc queries) 5 December 28th 04 09:11 AM
Combining SUM Function with Nested If Statement Somecallmejosh Excel Discussion (Misc queries) 3 December 6th 04 05:25 PM
Statement lintan Excel Worksheet Functions 1 December 3rd 04 12:31 AM
IF Statement difficulty susan hayes Excel Worksheet Functions 3 November 2nd 04 10:46 PM


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