=Right formula question

johnny52

Active Member
Joined
Oct 13, 2006
Messages
333
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
I have two columns .........in cell a1 the number 148.5 in cell b1 the formula =RIGHT(a1,1) the result 5 I'm fine with that
now in cell a2 I have the number 148.0 in b2 the formula =RIGHT(a2,1) the results I'm getting is 8 I want it to be 0

what am I doing wrong

Thanks everybody as always :)
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Sounds like your .0 is only cell formatting. Try using TEXT(A2,"0.0") instead of just A2 and see if that takes care of your problem.
 
Upvote 0
If you need the value this should work

=RIGHT(A1-INT(A1),1)

If there is more than 1 digit after the decimal you will have issues with it though.
 
Last edited:
Upvote 0
Solution
This works also regardless of how many digits after the decimal point.

The iferror applies when it is ".0" as that will return an error depending on format of column A

=IFERROR(MID(A1,SEARCH(".",A1,1)+1,LEN(A1)),0)
 
Upvote 0
Thanks your second response works fine for my needs

Thanks
 
Upvote 0
=IFERROR(MID(A1,SEARCH(".",A1,1)+1,LEN(A1)),0)

I used yours but this later response above,handles my needs too.Thank you as well :)
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top