trying to use forumla result from one cell in another formula

bander

New Member
Joined
Sep 10, 2014
Messages
5
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

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
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)
 
Upvote 0
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"
 
Upvote 0
sumproduct must return a number or error. We still don't know what formula is in B2
 
Upvote 0
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")))))
 
Upvote 0
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")))))
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top