Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to have a range on a spreadsheet give me a value when typed in.
for example In range C15:G77 I want to pick a cell and type 80, but I want it to show me only 20 (25% of the amount I put in). OR I'd like to type in numbers in cells, activate a macro (Ctrl+q) and have it multiply ONLY the new information by a factor (25%). Reply here or |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Right click sheet tabview codeinsert this
If Not Intersect(Target, Range("c15:g77")) Is Nothing Then Application.EnableEvents = False Target = Target * 0.25 Application.EnableEvents = True End If End Sub -- Don Guillett SalesAid Software "Mike G." wrote in message ... I would like to have a range on a spreadsheet give me a value when typed in. for example In range C15:G77 I want to pick a cell and type 80, but I want it to show me only 20 (25% of the amount I put in). OR I'd like to type in numbers in cells, activate a macro (Ctrl+q) and have it multiply ONLY the new information by a factor (25%). Reply here or |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Looks like a bad copy and paste,
Think Don meant: Right click on the sheet tab select view code then in the resulting module paste in this Private Sub Worksheet_Change(ByVal Target As Range) On Error goto ErrHandler if Target.count 1 then exit sub If Not Intersect(Target, Range("C15:G77")) Is Nothing Then Application.EnableEvents = False if isnumeric(Target) then Target = Target * 0.25 End if End If ErrHandler: Application.EnableEvents = True End Sub -- Regards, Tom Ogilvy "Don Guillett" wrote in message ... Right click sheet tabview codeinsert this If Not Intersect(Target, Range("c15:g77")) Is Nothing Then Application.EnableEvents = False Target = Target * 0.25 Application.EnableEvents = True End If End Sub -- Don Guillett SalesAid Software "Mike G." wrote in message ... I would like to have a range on a spreadsheet give me a value when typed in. for example In range C15:G77 I want to pick a cell and type 80, but I want it to show me only 20 (25% of the amount I put in). OR I'd like to type in numbers in cells, activate a macro (Ctrl+q) and have it multiply ONLY the new information by a factor (25%). Reply here or |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
GREAT PIECE OF CODE
Great Work Thank you, Thank you, Thank you, Mike "Tom Ogilvy" wrote: Looks like a bad copy and paste, Think Don meant: Right click on the sheet tab select view code then in the resulting module paste in this Private Sub Worksheet_Change(ByVal Target As Range) On Error goto ErrHandler if Target.count 1 then exit sub If Not Intersect(Target, Range("C15:G77")) Is Nothing Then Application.EnableEvents = False if isnumeric(Target) then Target = Target * 0.25 End if End If ErrHandler: Application.EnableEvents = True End Sub -- Regards, Tom Ogilvy "Don Guillett" wrote in message ... Right click sheet tabview codeinsert this If Not Intersect(Target, Range("c15:g77")) Is Nothing Then Application.EnableEvents = False Target = Target * 0.25 Application.EnableEvents = True End If End Sub -- Don Guillett SalesAid Software "Mike G." wrote in message ... I would like to have a range on a spreadsheet give me a value when typed in. for example In range C15:G77 I want to pick a cell and type 80, but I want it to show me only 20 (25% of the amount I put in). OR I'd like to type in numbers in cells, activate a macro (Ctrl+q) and have it multiply ONLY the new information by a factor (25%). Reply here or |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Perform action on every workbook in a directory | Excel Programming | |||
Compare two sheets and perform action routine | Excel Programming | |||
How to 'Click and then perform action' | Excel Programming | |||
How to perform action in all worksheets | Excel Programming | |||
Perform action when cell is clicked | Excel Programming |