Skip to Main Content
Computing with Excel and VBA
book

Computing with Excel and VBA

by S.I. Krishan
August 2008
Beginner to intermediate content levelBeginner to intermediate
298 pages
10h 49m
English
Jones & Bartlett Learning
Content preview from Computing with Excel and VBA
Problem Solving Examples 11 5
when the digits are added. The digits in K4 are added again to result in one which is
the lucky number for Poker Pete.
You should note that we would have obtained identical results even if the formula for
K2 was written as
=INT(J2/10)+MOD(J2,10)
This is because INT(J2/10) will return 0 and MOD(J2, 10) will return J2 if J2 is
less than 10. The same is true for cell L2; its formula could have been
=INT(K2/10)+MOD(K2,10)
This just shows that you can implement the same logic in more than one way.
Try It
We did the lucky number exercise using INT and MOD functions to isolate differ-
ent digits of a four-digit number. Now, con ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Excel Programming with VBA Starter

Excel Programming with VBA Starter

Robert F Martin
Programming Excel with VBA and .NET

Programming Excel with VBA and .NET

Jeff Webb, Steve Saunders

Publisher Resources

ISBN: 9780763756680