If Function error !!!

Solved/Closed
Waseem - May 11, 2011 at 10:49 AM
 Waseem - May 30, 2011 at 11:32 AM
Hello,

I have created a time tracker worksheet for my process. Am just stuck up with one function.

I have used the below function which has 8 if statements which works very well -

"=IF(C2="","",IF(C2="STOCK DIVIDEND",($AD$4-E2),IF(C2="CASH DIVIDEND",($AD$4-E2),IF(C2="BOND INT",($AD$3-E2),IF(C2="ACQ AND MERG",($AD$3-E2),IF(C2="SPLIT & REV SPLIT",($AD$3-E2),IF(C2="CFD DIVIDEND",($AD$5-E2),IF(C2="Scrap 35",($AD$4-E2),"N/A"))))))))"

If i try to add another If criteria it displays an error. Is there anything like this which we can use If statement on 8 criteria.

Below is the fundction whichi i tried to use and got an error

"=IF(C2="","",IF(C2="STOCK DIVIDEND",($AD$4-E2),IF(C2="CASH DIVIDEND",($AD$4-E2),IF(C2="BOND INT",($AD$3-E2),IF(C2="ACQ AND MERG",($AD$3-E2),IF(C2="SPLIT & REV SPLIT",($AD$3-E2),IF(C2="CFD DIVIDEND",($AD$5-E2),IF(C2="Scrap 35",($AD$4-E2),IF(C2="Scrap 35",($AD$4-E2),"N/A")))))))))"

Could someone please help me out with the solution.

Thanks in Advance !!!
Related:

3 responses

RWomanizer Posts 365 Registration date Monday February 7, 2011 Status Contributor Last seen September 30, 2013 120
May 12, 2011 at 05:45 AM
Hi Waseem,

Microsoft Excel's version before 2007, only 8 if commands are valid:

if you want to use use more if commands you can use micros or upgrade your Microsoft excel into 2007 or 2010.
0
Hi,

Thank you very much for reply !!!

Is it possible to add like below

8(if statements) + 8(if statements) + 8(if statements) If so please let me know the formula.

If not can you please suggest some other solution !! Like IFOR statements or someother macro as an example!!!
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
May 12, 2011 at 10:19 AM
Hi Waseem,

Here is a strategy to use more if statements.

A1 will be the cell to look at.
Now use a random cell (I used D9) to put the following formula in:
=IF(A1=1,2,IF(A1=2,3,IF(A1=3,4,(IF(A1=4,5,IF(A1=5,6,IF(A1=6,7,IF(A1=7,8,IF(A1=8,9,"FALSE")))))))))

Now use another random cell (I used E9) to put in the next formula (only created 2 IF's):
=IF(A1=9,10,IF(A1=10,11,"FALSE"))
Now use another random cell (I used F9) to put in the next formula (only created 1 IF):
=IF(A1=11,12,13)
Now use this formula to combine the other three:
=IF(D9="FALSE",IF(E9="FALSE",F9,E9),D9)
This way you can use 9 x 8 = 72 IF statements. Is that enough :) ?

Best regards,
Trowa
0
Hi Trowa,

Thanks for your explaination.

For your reference i have included the sample file in the below website.

http://www.speedyshare.com/files/28456549/tracker_template.xls

I have also mentioned my exact problem in that file.

Could you please look into it and let me know how to use more if statements in such criteria.

Thanks Again !!!
0
Hi,

Could someone please look into the above issue !!!

Thanks in Advance !!!
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
May 16, 2011 at 08:53 AM
Hi Waseem,

quote
The bolded items is just 7 with 8 if statements. Which is needs to be increased by 31.
unquote

Don't understand this? How can you increase a formula by 31?

Could you write out your nested IF formula so I can break it down for you?

Currently I can only guess what your other IF statements can be. Did I miss something in your file?

Best regards,
Trowa
0
Game Start Now Posts 138 Registration date Thursday January 21, 2010 Status Member Last seen May 8, 2019 7
May 16, 2011 at 10:23 PM
Install Ms Office 2007 & Use Your Last Written Formula. It Will 101% Works.
0
RWomanizer Posts 365 Registration date Monday February 7, 2011 Status Contributor Last seen September 30, 2013 120
May 17, 2011 at 12:48 AM
Hi Waseem,

Why don't you use Vlookup instead of Lots of If statements,

Just puts these values in a column say AD & AE :

CASH DIVIDEND $AB$4 -D2
STOCK DIVIDEND $AB$4 -D2
CFD DIVIDEND $AB$3 -D2
BOND INT $AB$5 -D2
and so on. now you can put as many as you required. (this is just an example not related to your formula)

and now put Formula in E2 as

= VLOOKUP(B2, $AD$1:$AD$100,2,false)
0