Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiples of a Number

Status
Not open for further replies.

leesanc

Technical User
Aug 25, 2006
10
MY
I am trying to write an If statement in Excel to return an "OK" if Value 1 - Value 2 = Multiples of 2 (i.e. 2,4,6,8,10,12 ....)

Is there any formula for "multiples of a specific number
 
How about:

=IF(MOD((Value1-Value2),2)=0,"OK","FALSE")

Where the 2 is the mutiple you want to check.
 
Wow! So fast.

Yes, it works! Thank you so much.
 
Or:
Code:
=IF(ISEVEN(Value1-Value2),"OK","FALSE")
if the multiple is always 2. ( tests for an even result. See the ISODD function for comparison. )

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
The multiple can be any other number, but this would come in handy too. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top