![]() |
Need to perform action on range
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 |
Need to perform action on range
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 |
Need to perform action on range
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 |
All times are GMT +1. The time now is 09:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com