Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2018, 12:53 AM
LearnerExcel LearnerExcel is offline Find last three digits after . ( including zero) Windows 7 32bit Find last three digits after . ( including zero) Office 2003
Advanced Beginner
Find last three digits after . ( including zero)
 
Join Date: Nov 2016
Posts: 81
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default Find last three digits after . ( including zero)

How to get last 3 digits after "." (Decimal) including zero ? The following formula doesn't work?



Code:
 =RIGHT(A1,3)
Example: 88,485.90 ----------- The result is 5.9 (But I need here .90 inculding last ZERO)
88,485.95 ----------- The result is .95 (Here it is okay as it gets last 3 digits after Decimal)

How to modify the formula?
Reply With Quote
  #2  
Old 02-06-2018, 01:11 AM
LearnerExcel LearnerExcel is offline Find last three digits after . ( including zero) Windows 7 32bit Find last three digits after . ( including zero) Office 2003
Advanced Beginner
Find last three digits after . ( including zero)
 
Join Date: Nov 2016
Posts: 81
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default

Code:
 
=A1-TRUNC(A1)
Problem resolved.
Reply With Quote
  #3  
Old 02-06-2018, 06:18 AM
Alsadius Alsadius is offline Find last three digits after . ( including zero) Windows 7 64bit Find last three digits after . ( including zero) Office 2010 32bit
Novice
 
Join Date: Nov 2017
Posts: 25
Alsadius is on a distinguished road
Default

Quote:
Originally Posted by LearnerExcel View Post
Code:
 
=A1-TRUNC(A1)
Problem resolved.
That'll get him all decimals, not just the last three.

Assume we're dealing with 123.456789.

=A1-TRUNC(A1)
will result in 0.456789

=ROUND(A1-TRUNC(A1), 3)
will result in 0.457 (it rounds it off to three decimal places)

=(TRUNC((A1-TRUNC(A1))*1000))/1000
will result in 0.456 (this is a nasty formula, but it basically shifts the decimal three places and re-truncates)

=RIGHT(A1-TRUNC(A1), 3)
should result in 789 (though this one gave me a floating-point error when I tried it, which may mean it's bug-prone in practice and needs caution)

Which one you want depends on exactly what you're trying to do, but hopefully that should cover all the bases.
Reply With Quote
  #4  
Old 02-06-2018, 09:35 AM
ArviLaanemets ArviLaanemets is offline Find last three digits after . ( including zero) Windows 8 Find last three digits after . ( including zero) Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Code:
=rounddown(a1,3)-trunc(a1)
Reply With Quote
  #5  
Old 02-08-2018, 10:49 AM
jolivanes jolivanes is offline Find last three digits after . ( including zero) Windows 10 Find last three digits after . ( including zero) Office 2013
Advanced Beginner
 
Join Date: Sep 2011
Posts: 93
jolivanes will become famous soon enough
Default

Code:
 
=text(right(a1, 3),"0.00")
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Having number's digits together mohsen.amiri Word 0 06-23-2017 01:20 AM
Find last three digits after . ( including zero) Digits are not found in my document! reza8615953 Word 3 04-18-2017 10:48 AM
Macro for find/replace (including headers and footers) for multiple documents jpb103 Word VBA 2 05-16-2014 04:59 AM
Multi-Doc Find/Replace, Including Headers/Footers & Textboxes konopca Word VBA 3 05-05-2014 03:18 PM
Find last three digits after . ( including zero) Problems merging in last 4 digits of an account higher than 16 digits Glynda Mail Merge 1 04-08-2011 12:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft