Integer Arithmetic. Mod and . Two of the more unusual arithmetic operators are Mod and Excel and VBA let you use them on Doubles as well, but we will stick to integers
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Mod and \ • Two of the more unusual arithmetic operators are Mod and \ • Excel and VBA let you use them on Doubles as well, but we will stick to integers • The \ operator is integer divide. It gives you the whole part of the answer without a remainder when two integers are divided • Mod gives the remainder
Examples • 17 \ 3 = 5 (the integer part of the quotient) • 17 Mod 3 = 2 (the remainder) • 24 \ 5 = 4, while 25 \ 5 = 5 • 24 Mod 5 = 4, while 25 Mod 5 = 0 • You can see these in action in the spreadsheet called CoinsIntegerDemo • This sheet also illustrates using a piece of clipart for a button