• Home
  • Blog
  • Resume
  • Contact
  • Projects
  • Gallery
  • Amit’s Resume
  • About Nagpur
KEEP IN TOUCH

MOD Function and Mod Operator Return Different Values

Feb08
2006
Leave a Comment Written by admin

I didn’t know this before today when an user at MrExcel wondered why he was not getting consistent answers with Excel and VBA. The key is negative numbers.

If you happen to have negative numbers (one of them) and you want to calculate MOD, you should use this code in VBA

yourmodval=n-d*INT(n/d)

Where n is your number and d is your divisor.

For more info, check:
MOD Function and Mod Operator Return Different Values

Related posts:

  1. PMT Worksheet Function
  2. Excel Function to check if text is palindrome or not
  3. Long formulas??
  4. Random Numbers
  5. Isworksheetopen and Isworkbookopen functions
Posted in Uncategorized - Tagged INT, MOD, VBA
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
« Change references
» Add Specific number of zeros to a value

No Comments Yet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Tags

Access Alt F8 Books boxplot cells charts count cursor dashboard data mining dbase design error excel excel functions export filter flip LaTex MS query Number Err ODBC pipes Press Alt F11 Public Sub python R random numbers Range Cells report scripting software sparklines SQL SQL server stack columns statistics stemming string tag cloud text mining UDF VBA visualization wildcard

Network

View Ashutosh Nandeshwar's profile on LinkedIn

Recent Comments

  • larry on Access Export to Excel (2007)
  • Betty Chou on Projects
  • Rwill on Access Export to Excel (2007)
  • Bharathi on The search key was not found in any record in Access
  • Michael on The search key was not found in any record in Access

Related Posts

  1. PMT Worksheet Function
  2. Excel Function to check if text is palindrome or not
  3. Long formulas??
  4. Random Numbers
  5. Isworksheetopen and Isworkbookopen functions

EvoLve theme by Blogatize  •  Powered by WordPress nandeshwar.info