Thanks:  0
Likes:  0

# Thread: IF Statement; result incorrect

1. =IF(D25>240,240,0)
How do I format the cell so that it comes up with 240? I currently have it formatted as Custom, m and t comes up with 8 instead of 240. 240 represents months.

Cell D25 has the following formula:
=DATEDIF(D22,D23,"M")

2. On 2002-05-01 11:38, minnie wrote:
=IF(D25>240,240,0)
How do I format the cell so that it comes up with 240? I currently have it formatted as Custom, m and t comes up with 8 instead of 240. 240 represents months.

Cell D25 has the following formula:
=DATEDIF(D22,D23,"M")
Sound like you want the NUMBER of months, not the month digit. "m" is for dates, you are asking for a number (I think).

3. On 2002-05-01 11:38, minnie wrote:
=IF(D25>240,240,0)
How do I format the cell so that it comes up with 240? I currently have it formatted as Custom, m and t comes up with 8 instead of 240. 240 represents months.

Cell D25 has the following formula:
=DATEDIF(D22,D23,"M")
What is m and t?

=IF(D25>240,240,0)

comes up with 8?

4. Hey Minnie,

I believe you want to format your cell with a number format.

I realized that the number 240 appears as the value "8" in a cell when formated with the custom "M" format - this is because 240 is the serial number for the date 8/27/1900 - the month of that date being 8.

5. hello Minnie

format the cell with the formula eith a number format.
It works

Andreas

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•