Evaluate Multiple Cells for Formulas

mpapa01

New Member
Joined
Dec 1, 2017
Messages
8
Hi all,

Im not new to the forum but been a while since I posted. I have a sheet that is pre-populated with cell formulas. in a different cell i would like to evaluate whether BOTH cells do NOT have formulas. in trying to combine into an IF(AND(NOT(ISFORMULA() it returns an error. any ideas on how to accomplish this? Here is the formula i've tried

Cell A1 = Hardcoded number
Cell A2 = Hardcoded number

Formula in cell A3

= IF(AND(NOT(ISFORMULA(A1,A2)),A1+A2),0)

So stuck on this one. Thanks
 
Hi,

I think it's a function that exists in Excel 2013 and above ... but I'm not sure about that.
You can simply create a function that checks whether the cell contains a formula:


Function IsFormula(cell_ref As Range)
IsFormula = cell_ref.HasFormula
End Function
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
In that case the formula WBD supplied in post#2 works for me.


Ok, but wont work for me. The formula WBD wrote evaluates and returns a true if the cells are formulas (and works just fine if that is want you are looking to do.) I want a True if they are not formulas. WBDs formula is not correct for my purposes.
 
Upvote 0
Hi,

I think it's a function that exists in Excel 2013 and above ... but I'm not sure about that.
You can simply create a function that checks whether the cell contains a formula:




Function IsFormula(cell_ref As Range)
IsFormula = cell_ref.HasFormula
End Function



Yup definitely a newer function. I was hoping to avoid code because I have a number of other things going on in the sheet and its part of a much larger workbook. Thanks for the code though. I def may need it
 
Upvote 0
Perhaps this :
=if(and(not(isformula(a1)),not(isformula(a2))),"True",a1+a2)


Thats It!! Slight tweak and this is the final formula that will work for me

=IF(AND(NOT(ISFORMULA(A1)),NOT(ISFORMULA(A2))),A1+A2)

Replicating the "NOT" function seems to have been tripping me up. Thanks so much!!!
 
Upvote 0

Forum statistics

Threads
1,224,769
Messages
6,180,852
Members
453,003
Latest member
SalihZekiKoni

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