If Formula with a cell that is a formula

S

sconstance

I'm trying to do a simple If function of If A1=A2 then return a 0 and if
incorrect return a 1.

However A1 is a NOW formula for the date and A2 is just the date manually
entered. It keeps returning a 1 because of the formula in A1 even when the
output of A1 matches A2.

Is there a way to get the If function to read the output value of A1 instead
of the formula inside of the cell?
 
S

ShaneDevenshire

Hi,

Try using =TODAY() instead of =NOW()

NOW track the date and time even if only the date is exposed.
 
R

Ron Rosenfeld

I'm trying to do a simple If function of If A1=A2 then return a 0 and if
incorrect return a 1.

However A1 is a NOW formula for the date and A2 is just the date manually
entered. It keeps returning a 1 because of the formula in A1 even when the
output of A1 matches A2.

Is there a way to get the If function to read the output value of A1 instead
of the formula inside of the cell?

The IF function IS reading the output value of A1. It is NOT reading the
formula.

The problem is that you don't understand what the NOW() function is doing.

From HELP for NOW: Returns the serial number of the current date and time.

It would be fortuitous if a manually entered date in A2 would match the date +
time in A1.

Some possible solutions:

1. In A1, use the TODAY function rather than the NOW function.

2. For your formula, use INT(A1) = A2


--ron
 
S

sconstance

Thanks that fixed it. Makes since.

ShaneDevenshire said:
Hi,

Try using =TODAY() instead of =NOW()

NOW track the date and time even if only the date is exposed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top