# Error in formula

#### osayiner

##### New Member
=CHOOSE(IF((G2>0;D2>0;G2-D2>0);1;IF(AND(G2>0;D2>0;G2-D2=0);2;IF(AND(G2>0;D2>0;G2-D2<0);3;IF(AND(G2=0;D2>0);4;IF(AND(J2>0;G2=0;D2>0);5;IF(AND(G2>0;D2=0);6;7))))));N2;N3;N4;N5;N6;N7;"hata")

The above formula is to branch the if statement to one of N? according to values of G2,D2 and J2.

It doesnt work and I cannot make it, why???

### Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
On 2002-10-08 10:24, osayiner wrote:
=CHOOSE(IF((G2>0;D2>0;G2-D2>0);1;IF(AND(G2>0;D2>0;G2-D2=0);2;IF(AND(G2>0;D2>0;G2-D2<0);3;IF(AND(G2=0;D2>0);4;IF(AND(J2>0;G2=0;D2>0);5;IF(AND(G2>0;D2=0);6;7))))));N2;N3;N4;N5;N6;N7;"hata")

The above formula is to branch the if statement to one of N? according to values of G2,D2 and J2.

It doesnt work and I cannot make it, why???

To access information From N? ; not to branch to N?

Consider something like

=IF(G2-D2>0,N2,IF(G2-D2=0,N3,IF(G2-D2<0,N4,IF(AND(G2=0,D2>0),N5,IF(AND(J2>0,G2=0,D2>0),N6,IF(AND(G2>0,D2=0),N7,"hata"))))))
This message was edited by Dave Patton on 2002-10-08 11:21

You may want to explain in english what you are trying to achieve. Also, it seems redundant to have an if statement returning a index number for the choose - why not just put the cell reference there and avoid the added choose functions?

Out of curiosity, what version / language are you using that uses semi-colons instead of commas?

What kind of data do you have in N2:N7, numbers?

On 2002-10-08 11:22, IML wrote:
[...]
Out of curiosity, what version / language are you using that uses semi-colons instead of commas?

Looks like the Turkish version to me.

On 2002-10-11 07:45, Aladin Akyurek wrote:

What kind of data do you have in N2:N7, numbers?

I have some explanations(text)in these cells. I have solved the problem anyway, thanks a lot for your concern...

Bir de Ýstanbul dan selamlar, ve ilginiz için özel teþekkürler...

Replies
24
Views
806
Replies
5
Views
152
Replies
2
Views
187
Replies
9
Views
412
Replies
6
Views
648

### Forum statistics

1,207,197
Messages
6,077,013
Members
446,250
Latest member
Dontcomehereoften

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back