Referencing a cell to put in the mathematical operator

loosenut

New Member
Joined
Feb 20, 2004
Messages
41
Hello!

I am building out a simple math sheet for my daughter. Trying to keep her learning during the times of COVID! The format is as follows:

Cell C7: "48" (or some other number)
Cell D7: "+" (or some other mathematical operator that I manually insert such as *, -, /, etc)
Cell E7: "20" (or some other number)
Cell I7: [she inputs her answer here, i.e. "68"]

What I am trying to figure out is a formula which executes the equation shown by C7 D7 E7 ("48 + 20") and compares it to her answer in cell I7. If correct, responds "Correct", if not "Is that your final answer??". So what I have so far is this:

=IF(I7=(C7,D7,E7),"CORRECT","IS THAT YOUR FINAL ANSWER??")

It results in error because (C7,D7,E7) is not the correct way to express the equation. What is the correct way to express it? If D7 were the same every time, this would be easy as I would just fix the mathematical operator between c7 and e7, but making it a reference to a mathematical operator I think is the challenge. Any help would be welcome.

Thanks!
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,575
Office Version
  1. 2010
Platform
  1. Windows
Give this formula a try...

=IF(I7=CHOOSE(FIND(D7,"+-*/"),C7+E7,C7-E7,C7*E7,C7/E7),"Correct","Is that your final answer??")
 

loosenut

New Member
Joined
Feb 20, 2004
Messages
41
Thank you Rick! Worked like a charm. Interim product below. Many thanks again for your help :)

1594389454998.png
 

Watch MrExcel Video

Forum statistics

Threads
1,118,794
Messages
5,574,329
Members
412,587
Latest member
Krucial155
Top