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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

ozbod

Board Regular
Joined
Apr 2, 2008
Messages
177
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

bander

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

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
sumproduct must return a number or error. We still don't know what formula is in B2
 
Upvote 0

bander

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

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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,191,177
Messages
5,985,140
Members
439,942
Latest member
bkexcel11230

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
Top