Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places
value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places
value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places
value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi TGV,
Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The cell values won't change after you uncheck the FD option.
Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Gord,
It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Office ButtonExcel OptionsAdvancedEditing OptionsAutomatically insert a
decimal point. You would have to use event code for just a few columns. I can provide that. Which columns are you talking about? Your first post is a bit ambiguous or some of us are misreading it. What exactly do you want? Enter 100 and it becomes 10? Enter 95 and it becomes 9.5? That's what I got from your initial description. Gord On Thu, 25 Jun 2009 10:51:01 -0700, Chi wrote: Hi Gord, It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Gord,
Sorry if my first post is a bit ambiguous. Yes! Enter 100 and it becomes 10 Enter 95 and it becomes 9.5 I would like column D, C and E work that way -(Enter 100 and it becomes 10 and enter 95 and it becomes 9.5) Thank you very much for your patience. Chi "Gord Dibben" wrote: Office ButtonExcel OptionsAdvancedEditing OptionsAutomatically insert a decimal point. You would have to use event code for just a few columns. I can provide that. Which columns are you talking about? Your first post is a bit ambiguous or some of us are misreading it. What exactly do you want? Enter 100 and it becomes 10? Enter 95 and it becomes 9.5? That's what I got from your initial description. Gord On Thu, 25 Jun 2009 10:51:01 -0700, Chi wrote: Hi Gord, It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range(Target(1).Address), _ Range("C:C, D:D, E:E")) Is Nothing Then Exit Sub On Error GoTo endit Application.EnableEvents = False With Target .Value = .Value / 10 End With endit: Application.EnableEvents = True End Sub Right-click on the sheet tab and "View Code" Copy/paste the above into that sheet module. Alt + q to return to the Excel window. Gord On Thu, 25 Jun 2009 14:32:01 -0700, Chi wrote: Hi Gord, Sorry if my first post is a bit ambiguous. Yes! Enter 100 and it becomes 10 Enter 95 and it becomes 9.5 I would like column D, C and E work that way -(Enter 100 and it becomes 10 and enter 95 and it becomes 9.5) Thank you very much for your patience. Chi "Gord Dibben" wrote: Office ButtonExcel OptionsAdvancedEditing OptionsAutomatically insert a decimal point. You would have to use event code for just a few columns. I can provide that. Which columns are you talking about? Your first post is a bit ambiguous or some of us are misreading it. What exactly do you want? Enter 100 and it becomes 10? Enter 95 and it becomes 9.5? That's what I got from your initial description. Gord On Thu, 25 Jun 2009 10:51:01 -0700, Chi wrote: Hi Gord, It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#11
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Gord,
Thank you for your help! I copied the code and used it. However, all I see was the numbers €ś0" appeared when I put the cursor in the C, D or E columns. Please help! Chi "Gord Dibben" wrote: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range(Target(1).Address), _ Range("C:C, D:D, E:E")) Is Nothing Then Exit Sub On Error GoTo endit Application.EnableEvents = False With Target .Value = .Value / 10 End With endit: Application.EnableEvents = True End Sub Right-click on the sheet tab and "View Code" Copy/paste the above into that sheet module. Alt + q to return to the Excel window. Gord On Thu, 25 Jun 2009 14:32:01 -0700, Chi wrote: Hi Gord, Sorry if my first post is a bit ambiguous. Yes! Enter 100 and it becomes 10 Enter 95 and it becomes 9.5 I would like column D, C and E work that way -(Enter 100 and it becomes 10 and enter 95 and it becomes 9.5) Thank you very much for your patience. Chi "Gord Dibben" wrote: Office ButtonExcel OptionsAdvancedEditing OptionsAutomatically insert a decimal point. You would have to use event code for just a few columns. I can provide that. Which columns are you talking about? Your first post is a bit ambiguous or some of us are misreading it. What exactly do you want? Enter 100 and it becomes 10? Enter 95 and it becomes 9.5? That's what I got from your initial description. Gord On Thu, 25 Jun 2009 10:51:01 -0700, Chi wrote: Hi Gord, It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#12
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi TGV,
I changed the Places value as -1 and it worked! It affected whole sheet. In my case, I only would like the numbers changed in columns D, C, and E. Thanks Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#13
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Good Morning Gord,
It works!!! I tried to test the code many times and now I know it works! However, I need to put the cursor in the cell C2 €ś2 times€ť to make it works. Ex: As soon as I put the cursor in the C2, the number "0" appeared/then I enter 145/place the cursor out off C2/then put it in C2 again/the number 14.5 appeared. I wish that I enter 145, it will be 15.5 as soon as I place the cursor out off C2 Thanks Chi "Gord Dibben" wrote: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range(Target(1).Address), _ Range("C:C, D:D, E:E")) Is Nothing Then Exit Sub On Error GoTo endit Application.EnableEvents = False With Target .Value = .Value / 10 End With endit: Application.EnableEvents = True End Sub Right-click on the sheet tab and "View Code" Copy/paste the above into that sheet module. Alt + q to return to the Excel window. Gord On Thu, 25 Jun 2009 14:32:01 -0700, Chi wrote: Hi Gord, Sorry if my first post is a bit ambiguous. Yes! Enter 100 and it becomes 10 Enter 95 and it becomes 9.5 I would like column D, C and E work that way -(Enter 100 and it becomes 10 and enter 95 and it becomes 9.5) Thank you very much for your patience. Chi "Gord Dibben" wrote: Office ButtonExcel OptionsAdvancedEditing OptionsAutomatically insert a decimal point. You would have to use event code for just a few columns. I can provide that. Which columns are you talking about? Your first post is a bit ambiguous or some of us are misreading it. What exactly do you want? Enter 100 and it becomes 10? Enter 95 and it becomes 9.5? That's what I got from your initial description. Gord On Thu, 25 Jun 2009 10:51:01 -0700, Chi wrote: Hi Gord, It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#14
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() "Chi" wrote: Good Morning Gord, It works!!! I tried to test the code many times and now I know it works! However, I need to put the cursor in the cell C2 €ś2 times€ť to make it works. Ex: As soon as I put the cursor in the C2, the number "0" appeared/then I enter 145/place the cursor out off C2/then put it in C2 again/the number 14.5 appeared. I wish that I enter 145, it will be 14.5 as soon as I place the cursor out off C2 Thanks Chi "Gord Dibben" wrote: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range(Target(1).Address), _ Range("C:C, D:D, E:E")) Is Nothing Then Exit Sub On Error GoTo endit Application.EnableEvents = False With Target .Value = .Value / 10 End With endit: Application.EnableEvents = True End Sub Right-click on the sheet tab and "View Code" Copy/paste the above into that sheet module. Alt + q to return to the Excel window. Gord On Thu, 25 Jun 2009 14:32:01 -0700, Chi wrote: Hi Gord, Sorry if my first post is a bit ambiguous. Yes! Enter 100 and it becomes 10 Enter 95 and it becomes 9.5 I would like column D, C and E work that way -(Enter 100 and it becomes 10 and enter 95 and it becomes 9.5) Thank you very much for your patience. Chi "Gord Dibben" wrote: Office ButtonExcel OptionsAdvancedEditing OptionsAutomatically insert a decimal point. You would have to use event code for just a few columns. I can provide that. Which columns are you talking about? Your first post is a bit ambiguous or some of us are misreading it. What exactly do you want? Enter 100 and it becomes 10? Enter 95 and it becomes 9.5? That's what I got from your initial description. Gord On Thu, 25 Jun 2009 10:51:01 -0700, Chi wrote: Hi Gord, It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#15
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Have you altered the code I posted?
Perhaps you changed it to Private Sub Worksheet_SelectionChange(ByVal Target As Range) Which would give you zero when the cell was first selected. Gord On Tue, 30 Jun 2009 07:59:01 -0700, Chi wrote: Good Morning Gord, It works!!! I tried to test the code many times and now I know it works! However, I need to put the cursor in the cell C2 “2 times” to make it works. Ex: As soon as I put the cursor in the C2, the number "0" appeared/then I enter 145/place the cursor out off C2/then put it in C2 again/the number 14.5 appeared. I wish that I enter 145, it will be 15.5 as soon as I place the cursor out off C2 Thanks Chi "Gord Dibben" wrote: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range(Target(1).Address), _ Range("C:C, D:D, E:E")) Is Nothing Then Exit Sub On Error GoTo endit Application.EnableEvents = False With Target .Value = .Value / 10 End With endit: Application.EnableEvents = True End Sub Right-click on the sheet tab and "View Code" Copy/paste the above into that sheet module. Alt + q to return to the Excel window. Gord On Thu, 25 Jun 2009 14:32:01 -0700, Chi wrote: Hi Gord, Sorry if my first post is a bit ambiguous. Yes! Enter 100 and it becomes 10 Enter 95 and it becomes 9.5 I would like column D, C and E work that way -(Enter 100 and it becomes 10 and enter 95 and it becomes 9.5) Thank you very much for your patience. Chi "Gord Dibben" wrote: Office ButtonExcel OptionsAdvancedEditing OptionsAutomatically insert a decimal point. You would have to use event code for just a few columns. I can provide that. Which columns are you talking about? Your first post is a bit ambiguous or some of us are misreading it. What exactly do you want? Enter 100 and it becomes 10? Enter 95 and it becomes 9.5? That's what I got from your initial description. Gord On Thu, 25 Jun 2009 10:51:01 -0700, Chi wrote: Hi Gord, It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#16
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Gord,
It works perfectly!!! Sorry. Since i don't know anything about coding, I accidently changed the code. You were right. Thank you very much for your patience and help! Chi "Gord Dibben" wrote: Have you altered the code I posted? Perhaps you changed it to Private Sub Worksheet_SelectionChange(ByVal Target As Range) Which would give you zero when the cell was first selected. Gord On Tue, 30 Jun 2009 07:59:01 -0700, Chi wrote: Good Morning Gord, It works!!! I tried to test the code many times and now I know it works! However, I need to put the cursor in the cell C2 €ś2 times€ť to make it works. Ex: As soon as I put the cursor in the C2, the number "0" appeared/then I enter 145/place the cursor out off C2/then put it in C2 again/the number 14.5 appeared. I wish that I enter 145, it will be 15.5 as soon as I place the cursor out off C2 Thanks Chi "Gord Dibben" wrote: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range(Target(1).Address), _ Range("C:C, D:D, E:E")) Is Nothing Then Exit Sub On Error GoTo endit Application.EnableEvents = False With Target .Value = .Value / 10 End With endit: Application.EnableEvents = True End Sub Right-click on the sheet tab and "View Code" Copy/paste the above into that sheet module. Alt + q to return to the Excel window. Gord On Thu, 25 Jun 2009 14:32:01 -0700, Chi wrote: Hi Gord, Sorry if my first post is a bit ambiguous. Yes! Enter 100 and it becomes 10 Enter 95 and it becomes 9.5 I would like column D, C and E work that way -(Enter 100 and it becomes 10 and enter 95 and it becomes 9.5) Thank you very much for your patience. Chi "Gord Dibben" wrote: Office ButtonExcel OptionsAdvancedEditing OptionsAutomatically insert a decimal point. You would have to use event code for just a few columns. I can provide that. Which columns are you talking about? Your first post is a bit ambiguous or some of us are misreading it. What exactly do you want? Enter 100 and it becomes 10? Enter 95 and it becomes 9.5? That's what I got from your initial description. Gord On Thu, 25 Jun 2009 10:51:01 -0700, Chi wrote: Hi Gord, It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
#17
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Good to hear you're sorted out.
When given code, you should paste it into the module as is. Any editing can be done on ranges etc. but the code will have been tested for the type of event so that should not be changed in most cases. Gord On Tue, 30 Jun 2009 12:09:02 -0700, Chi wrote: Hi Gord, It works perfectly!!! Sorry. Since i don't know anything about coding, I accidently changed the code. You were right. Thank you very much for your patience and help! Chi "Gord Dibben" wrote: Have you altered the code I posted? Perhaps you changed it to Private Sub Worksheet_SelectionChange(ByVal Target As Range) Which would give you zero when the cell was first selected. Gord On Tue, 30 Jun 2009 07:59:01 -0700, Chi wrote: Good Morning Gord, It works!!! I tried to test the code many times and now I know it works! However, I need to put the cursor in the cell C2 “2 times” to make it works. Ex: As soon as I put the cursor in the C2, the number "0" appeared/then I enter 145/place the cursor out off C2/then put it in C2 again/the number 14.5 appeared. I wish that I enter 145, it will be 15.5 as soon as I place the cursor out off C2 Thanks Chi "Gord Dibben" wrote: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range(Target(1).Address), _ Range("C:C, D:D, E:E")) Is Nothing Then Exit Sub On Error GoTo endit Application.EnableEvents = False With Target .Value = .Value / 10 End With endit: Application.EnableEvents = True End Sub Right-click on the sheet tab and "View Code" Copy/paste the above into that sheet module. Alt + q to return to the Excel window. Gord On Thu, 25 Jun 2009 14:32:01 -0700, Chi wrote: Hi Gord, Sorry if my first post is a bit ambiguous. Yes! Enter 100 and it becomes 10 Enter 95 and it becomes 9.5 I would like column D, C and E work that way -(Enter 100 and it becomes 10 and enter 95 and it becomes 9.5) Thank you very much for your patience. Chi "Gord Dibben" wrote: Office ButtonExcel OptionsAdvancedEditing OptionsAutomatically insert a decimal point. You would have to use event code for just a few columns. I can provide that. Which columns are you talking about? Your first post is a bit ambiguous or some of us are misreading it. What exactly do you want? Enter 100 and it becomes 10? Enter 95 and it becomes 9.5? That's what I got from your initial description. Gord On Thu, 25 Jun 2009 10:51:01 -0700, Chi wrote: Hi Gord, It works!!! Thank you for your explanation. In my case, I need only few columns, instead of whole sheet. Is there away to do that? I am using 2007 so would you please also show me where the Fixed Decimal is? Thanks Chi "Gord Dibben" wrote: The cell values won't change after you uncheck the FD option. Once entered, they are fixed at that value. Re-enter numbers. Gord Dibben MS Excel MVP On Thu, 25 Jun 2009 10:16:02 -0700, Chi wrote: Hi TGV, Thank you for your help, but It didn't work, not thing happen, after I uncheck the check box. Chi "TGV" wrote: Tools-Options-Edit-Fixed Decimal - Uncheck the check box or change the Places value as "0". TGV "Chi" wrote: Hi, Would you please show me how I can format the cells appear like the below example? Ex: if I enter to a cell 100, it will become 10 If I enter to a cell 95, it will become 9.5 And if I enter to a cell 90, it will show 9. Thanks Chi Chi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting lost when saving excel 2003 file using excel 2007 | Excel Discussion (Misc queries) | |||
"Excel encountered an error and had to remove some formatting toavoid corrupting the workbook. Please re-check your formatting carefully." | Excel Discussion (Misc queries) | |||
Saving Excel 2007 conditional formatting in Excel 2003 format | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
expanding custom formatting without removing existing cell formatting? | Excel Worksheet Functions |