Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How do I perform a calculation on a 20 digit number in an excel ?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 31
Default How do I perform a calculation on a 20 digit number in an excel ?


"vaishali" wrote in message ...

Hi V.

You might use the Decimal datatype in VBA.
It has 28 digit precision.
Suppose you enter your 20 digit numbers in A1 and A2 with ' in front.
The sum is =myplus(A1,A2)
where myplus is your own user defined function

Function myplus$(x$, y$)
myplus = CDec(0) + x + y
End Function

Paste that little function after you have pressed Alt+F11, and chosen Insert Module
The function will then sit in Module1 of the workbook, and can be used from the function list.

Same thing, nearly, with minus, multiply, divide
but multiplications, for instance, will necessarily be rounded.

Hans T.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I perform time calculation formuals in excel Dave Phillips Excel Worksheet Functions 4 January 22nd 10 05:31 AM
How to perform matrix calculation in excel? Eric Excel Discussion (Misc queries) 1 May 28th 07 02:15 AM
How to validate a cell to insert from 9 digit number to 13 digit number. ramulu via OfficeKB.com Excel Worksheet Functions 1 February 21st 07 02:32 PM
How to validate a cell to insert from 9 digit number to 13 digit number. ramulu Excel Worksheet Functions 1 February 21st 07 10:00 AM
When we enter a 16 digit number (credit card) the last digit chan. ceking Excel Discussion (Misc queries) 5 December 8th 04 11:45 PM


All times are GMT +1. The time now is 06:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"