ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel-formatting (https://www.excelbanter.com/excel-discussion-misc-queries/235000-excel-formatting.html)

Chi

Excel-formatting
 
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

TGV

Excel-formatting
 
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


TGV

Excel-formatting
 
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


TGV

Excel-formatting
 
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


Chi

Excel-formatting
 
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


Gord Dibben

Excel-formatting
 
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



Chi

Excel-formatting
 
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




Gord Dibben

Excel-formatting
 
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





Chi

Excel-formatting
 
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





Gord Dibben

Excel-formatting
 
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






Chi

Excel-formatting
 
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







Chi

Excel-formatting
 
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


Chi

Excel-formatting
 
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







Chi

Excel-formatting
 


"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







Gord Dibben

Excel-formatting
 
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








Chi

Excel-formatting
 
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









Gord Dibben

Excel-formatting
 
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











All times are GMT +1. The time now is 08:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com