Hi Lakshman, Please use the below codes:
Sub Right_Delete() ' This module will delete text from Right in selected cells. Dim MyCell As Range Dim Total_Chars As Integer On Error Resume Next Total_Chars = 2 For Each MyCell In Selection.Cells If Len(MyCell.Value) > Total_Chars Then MyCell.Value = Mid(MyCell.Value, 1, Len(MyCell.Value) - Total_Chars) End If Next On Error GoTo 0 End Sub Regards, MARIES. +971559828492 On Wed, Dec 7, 2011 at 1:09 PM, Aindril De <aind...@gmail.com> wrote: > Sorry NOT USING TRIM > > > On Wed, Dec 7, 2011 at 2:39 PM, Aindril De <aind...@gmail.com> wrote: > >> NOTE: >> I am using the simple TRIM(<>) function as the data you have sent >> contains multiple spaces in the trail. >> >> >> On Wed, Dec 7, 2011 at 2:35 PM, Aindril De <aind...@gmail.com> wrote: >> >>> Dear Lakshman, >>> >>> You are not able to do the SUM as the data in the last column has >>> leading and trailing spaces. >>> You can use the add-on >>> http://www.ablebits.com/excel-trim-spaces/index.php >>> to quickly remove the spaces, if you regularly receive/generate such >>> data. >>> >>> Cheers, >>> Andy >>> >>> >>> On Wed, Dec 7, 2011 at 1:43 PM, Lakshman Prasad >>> <lakshman...@yahoo.com>wrote: >>> >>>> Dear All, >>>> Plz see the attach file. I can’t understand why I m unable to do sum. >>>> What is the problem in sheet or number? Help anybody? >>>> Regards >>>> LAKSHMAN >>>> >>>> -- >>>> FORUM RULES (934+ members already BANNED for violation) >>>> >>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please >>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >>>> will not get quick attention or may not be answered. >>>> >>>> 2) Don't post a question in the thread of another member. >>>> >>>> 3) Don't post questions regarding breaking or bypassing any security >>>> measure. >>>> >>>> 4) Acknowledge the responses you receive, good or bad. >>>> >>>> 5) Cross-promotion of, or links to, forums competitive to this forum in >>>> signatures are prohibited. >>>> >>>> NOTE : Don't ever post personal or confidential data in a workbook. >>>> Forum owners and members are not responsible for any loss. >>>> >>>> >>>> ------------------------------------------------------------------------------------------------------ >>>> To post to this group, send email to excel-macros@googlegroups.com >>>> >>> >>> >>> >>> -- >>> >>> Warm Regards, >>> Aindril De >>> Ph: 9811300157 >>> >>> >> >> >> -- >> >> Warm Regards, >> Aindril De >> Ph: 9811300157 >> >> > > > -- > > Warm Regards, > Aindril De > Ph: 9811300157 > > -- > FORUM RULES (934+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > -- FORUM RULES (934+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com