# trying to use forumla result from one cell in another formula

#### bander

##### New Member
Hi,

I've got a formula that gives me a number in one cell and I'm trying to use that result in another formula but is not working.

So in cell A2, I have a sumproduct that gives a number as a result.

In cell B2 I have another number that is the result of a forumula.

In cell C2 I am doing a simple IF comparison, =IF(A2=B2, "equal", "not equal")

its not working due to the formulas, it works fine if I just use plain text values.

Any ideas?

### Excel Facts

If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
What is the formula in B2?

Hi bander,

I have not tested this, but try casting them as the value

=IF(VALUE(A2) = VALUE(B2), "equal", "not equal")

(but possibly the values don't match due to decimal results)

Hey sorry for the late reply.

It's ok, I used EXACT to compare the first two and then just normal IF statements in the rest of the formula. Here's the full thing if anyone is interested:

=IF(EXACT(D1859,C1859),"Full",IF(B1859="no", "No map", IF(D1859=0,"None","Half")))

If D1859 and C1859 are equal then display "Full"
If B1859 is "no" then display "no map"
If D1859 is equal to 0, then display "none"
For anything else display "Half"

sumproduct must return a number or error. We still don't know what formula is in B2

It was a countif formula:

=IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=1,"1",IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=2,"2",IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=3,"3",IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=4,"4",IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=5,"5", "No Heatmap")))))

Try without the "" around the numbers

=IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=1,1,IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=2,2,IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=3,3,IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=4,4,IF(COUNTIF('Heatmap data'!\$A\$2:\$A\$2698,'Storeroom Coverage data'!A14)=5,5, "No Heatmap")))))

Replies
1
Views
220
Replies
4
Views
293
Replies
3
Views
374
Replies
15
Views
559
Replies
3
Views
239

1,221,127
Messages
6,158,103
Members
451,464
Latest member
Holden3

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