1. ## If Formula (2007)

Loungers,

I'm trying to sort out am =if() for the following example - if A1 contains a value say 6243, in B1 if the last 3 numbers are greater then 240 but less than 250, put "DUE" if greater than 250 put 'required".

I'm sure that this is fairly simple - but getting towards the end of the day.

2. ## Re: If Formula (2007)

=IF(AND(MOD(A1,1000)>240,MOD(A1,1000)<250),"Due",I F(MOD(A1,1000)>250,"Required",""))

3. ## Re: If Formula (2007)

Hans

Thanks for the reply - could you please let me know how the MOD function works in this example

4. ## Re: If Formula (2007)

The MOD(a, [img]/forums/images/smilies/cool.gif[/img] function returns the remainder of a after division by b.
So MOD(A1,1000) returns the remainder of the value of A1 after division by 1000, in other words it discards the thousands and keeps the last three digits, which was what you wanted to look at.

5. ## Re: If Formula (2007)

Thanks very much Hans

#### Posting Permissions

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