Hi there,
I'm new to this forum and am learning excel. I have a lot of programming experience, and this problem seems trivial, but I can't figure it out.

All cells in the following example use currency formatting. The quotes are there just for display, they are not entered in the real input box.

I have a cell, let's say A1. I've inputted a value of 200.
B1 has this inputted: '=A1*0.05'
C1 has '=A1+B1'

So far so good, C1 shows the correct calculation.

I have another cell D1 which I use to input an amount.

In E1, I have this: '=IF(C1=D1, D1*0.8, 0)'

After inputting the same value into D1 as seen in C1, this is where the problem lies. Even though both C1 and D1 cells show the same value, E1 returns 0. It seems it's comparing the formula of C1 as text, not the value the formula returned.

I've tried this:
'=IF(value(C1)=value(D1), D1*0.8, 0)'

and using the Cell function, but nothing works.

I would think that when you refer to a cell name, it returns the value calculated by the formula inside it, not the formula itself. That's how any programming language works. When you refer to a variable or function, it returns the value found in that variable or the value returned by the function.

Any help would be great. Thanks