Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default If formula based on digits?

Is there anyway to pull out certain digits based on rounding?

In A1...143.265 So my if would be =if(A1<0,A1,"")

However I only want the 2 digits after the decimal to pull. I know I can do
a middle, or right formula but how would this work if I had several rows some
with 1.199 and others with 145.258?

Please help
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,345
Default If formula based on digits?

Do you want them as whole numbers like 19 and 25 or as rounded numbers like
20 & 26 or even as decimale like 0.19 & 0.25 or rounded like 0.2 & 0.26?

For whole unrounded numbers use:

=INT(MOD(A1,1)*100)

For rounded whole numbers use:

=ROUND(MOD(A1,1)*100,0)

For unrounded decimals use:

=INT(MOD(A1,1)*100)/100

For rounded decimal numbers use:

=ROUND(MOD(A1,1),2)


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Hamed parhizkar" wrote in
message ...
Is there anyway to pull out certain digits based on rounding?

In A1...143.265 So my if would be =if(A1<0,A1,"")

However I only want the 2 digits after the decimal to pull. I know I can
do
a middle, or right formula but how would this work if I had several rows
some
with 1.199 and others with 145.258?

Please help



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If formula based on digits?

The two digits you want "pulled"... do you want them as Text or as Numbers.
I ask because there is a question of what to give you for something like
123.02 and 123.20, or 12.00, if you want them to be numbers after they are
"pulled".

Rick


"Hamed parhizkar" wrote in
message ...
Is there anyway to pull out certain digits based on rounding?

In A1...143.265 So my if would be =if(A1<0,A1,"")

However I only want the 2 digits after the decimal to pull. I know I can
do
a middle, or right formula but how would this work if I had several rows
some
with 1.199 and others with 145.258?

Please help


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
VBA write macro change column with 3 number digits to 4 digits the James C[_2_] Excel Discussion (Misc queries) 3 January 25th 10 03:12 PM
Checking status of issues based on first two digits of a field The Fool on the Hill Excel Discussion (Misc queries) 7 February 26th 08 03:12 PM
Validation based on digits in the middle of a string TexasStar Excel Programming 5 April 20th 07 10:48 PM
data filtering based on last two digits of large number Margo Guda Excel Worksheet Functions 13 March 20th 06 03:22 AM
How do I sort numbers based on last two digits? The Wallaby Excel Programming 2 March 21st 05 06:30 PM


All times are GMT +1. The time now is 09:19 PM.

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

About Us

"It's about Microsoft Excel"