Use IF formula to reference data within a formula?

tvalcorn

New Member
Joined
Sep 24, 2017
Messages
2
Hi All,

Is it possible to search the data within a formula rather than the text that the formula produces?

I would like to return a value if a cell references a specific cell.

i.e. =IF({A2 references C2},"Yes","No")

Thanks in advance!!!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try to play with this. It will work however is not 100% functional as it will also return "Yes" if A2 references C22 or AC2. Now I do not have time to provide a final solution, but at least you have a starting point. I will try to post final solution later today.

Code:
=IF(IFERROR(FIND("C2",FORMULATEXT(A2)),0),"Yes","No")
 
Upvote 0
Thanks RatExcel!

I played around with it a little more and have come up with this:

=IF(ISNUMBER(SEARCH(CELL("address",$C$2),FORMULATEXT(A2))),"YES","NO")

which works. but not sure if I've made it harder than it needs to be...
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,169
Members
453,021
Latest member
Justyna P

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