# Formula to calculate only if a cell has value, else to be blank

I am trying to create a quiz, and in the sheet, I have three columns, one for Answer, one for Correct Answer, and one for Result.
Initially, the Answer column will be blank, as user has not selected an answer, the Correct answer will have the correct answer value, and the Result column will show True if Answer = Correct Answer and false if Answer not equal to Correct Answer. But, when the answer Column is blank, I want the Result to be blank, Right now, with the formula I have used =ARRAYFORMULA(IF(LEN(A2:A)=0,â€śâ€ť,G2:G=H2:H), it is showing FALSE. Could you help me with the correct formula I can use to keep Result blank if the Answer is blank?

Use a template column in Glide data editor to set the response (or use a gsheet column, no matter).

Then add an if/then/else column in data editor with the following : if response is empty then empty else â€śanswer columnâ€ť.

And in your app, the answer will be displayed using the if/then/else column.

I am sorry I am not able to understand your approach. If I use the IF-THEN-ELSE column in data editor, is this what I use?
If Answer is empty, then Result is Empty

Is that what you are suggesting?

The if/then/else column will be populated as follow : if answer is empty then â€śemptyâ€ť (null value) else â€śvalue of the result columnâ€ť (true or false)

And your result column will also be an if/then/else column : if answer is empty then empty And if answer equals correct answer then TRUE else FALSE

How do i check if Answer equals Correct Answer using the If-Then-Else column. Because, I dont see an option to compare two columns, it only compares a column with a value we need to enter.