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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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