# IF formula:logical test; result of formula referred to

#### MissAJ

##### Board Regular
I am a teacher making a gradebook on Excel 2003 on Windows XP. Can I make the logical test part of an IF formula refer to a cell with another formula in it? Right now, the logical test of my IF formula is B6>0. B6 contains another formula, but I want the IF formula to test for the results of the formula in B6 (to be greater than 0 or not), not for the presence of a formula in B6.

### Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I think it can be done. try an experiment
a1 2
b1 4
c1
=a1*b1
in d1 type
=if(c1>0,c1,0)
see what happens

in excel your must always with trivial examples.
venkat

Thanks very much for your reply. Everyone at this forum is great to be helpful and accomodating. In the meantime, the Lord helped me to realize that I wasn't correctly reading the formula that I was referring to, especially the results it was producing. I've repaired my logical test accordingly. Thanks again.

Thanks very much for your reply. Everyone at this forum is great to be helpful and accomodating. In the meantime, the Lord helped me to realize that I wasn't correctly reading the formula that I was referring to, especially the results it was producing. I've repaired my logical test accordingly. Thanks again.

The test depends a bit on what results the formula in B6 calculates...

Code:
=IF(ISNUMBER(B6),
IF(B6 >0,
Then-Calculation,
Else-Calculation),
Else-Calculation)
or:
Code:
=IF(N(B6) >0,
Then-calculation,
Else-Calculation)

Replies
4
Views
260
Replies
2
Views
334
Replies
5
Views
270
Replies
4
Views
337
Replies
1
Views
194

1,219,807
Messages
6,150,347
Members
450,952
Latest member
Zung

### 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