Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default 1000 to 1 and 1 to 1000

When I type 1000 in one cell and then push enter, I would like that only 1 is
shown.

Vice versa, typing 1 €“ I would like the cell to show 1000.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default 1000 to 1 and 1 to 1000

This Change-event code might be what you're looking for.....

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target = 1 Then
Target.Value = 1000
Else
If Target = 1000 Then
Target.Value = 1
Else
End If
End If
End Sub

Vaya con Dios,
Chuck, CABGx3



"Olle" wrote:

When I type 1000 in one cell and then push enter, I would like that only 1 is
shown.

Vice versa, typing 1 €“ I would like the cell to show 1000.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 618
Default 1000 to 1 and 1 to 1000

"Olle" wrote in message
...
When I type 1000 in one cell and then push enter, I would like that only 1
is
shown.

Vice versa, typing 1 - I would like the cell to show 1000.


You could use Tools/ AutoCorrect Options, but it sounds a dangerous way of
asking your sheet to behave.
--
David Biddulph



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default 1000 to 1 and 1 to 1000

Chuck,
you speak of the Change event but you are giving a SelectionChange
routine. With this one 1 and 1000 will be toggled whenever one clicks
on a cell containing either value.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value = 1 Or Target.Value = 1000 Then
Application.EnableEvents = False
If Target.Value = 1 Then
Target.Value = 1000
Else
Target.Value = 1
End If
Application.EnableEvents = True
End If
End Sub

HTH
Kostis Vezerides

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default 1000 to 1 and 1 to 1000

I found the answer my self:

Tools €“ options €“ Edit and look for fixed decimal places.

Thanks anyhow // Olle


"Olle" wrote:

When I type 1000 in one cell and then push enter, I would like that only 1 is
shown.

Vice versa, typing 1 €“ I would like the cell to show 1000.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 618
Default 1000 to 1 and 1 to 1000

Yes, but that would only work in one direction or the other, but not both.
--
David Biddulph

"Olle" wrote in message
...
I found the answer my self:

Tools - options - Edit and look for fixed decimal places.

Thanks anyhow // Olle


"Olle" wrote:

When I type 1000 in one cell and then push enter, I would like that only
1 is
shown.

Vice versa, typing 1 - I would like the cell to show 1000.



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
import 1000 webs to Explorer from Excel. Ramon Gavin Excel Discussion (Misc queries) 0 December 14th 05 02:11 AM
Continue formula to LINE 1000 without showing FALSE chieron Excel Worksheet Functions 2 December 8th 05 12:52 PM
how do I see more than 1000 records filtered ml Excel Discussion (Misc queries) 1 April 13th 05 08:47 PM
Function Help Steven M. Britton Excel Worksheet Functions 0 December 9th 04 03:33 PM
Amortization Schedule Steven M. Britton Excel Worksheet Functions 0 December 8th 04 04:23 AM


All times are GMT +1. The time now is 07:30 PM.

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

About Us

"It's about Microsoft Excel"