Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Input cell should display a percentage of input value in the cell

Please read the below discussion and suggest an answer

Many thanks for ur answer
what if i want to change B1:B700(but want to leave one cell for sum total in
every 8 cells down), similarly in C1:C700, & D1: D700
--
Life isa journey not a destination


"Gary''s Student" wrote:

Put this event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range
Set r = Range("B9")
If Intersect(r, Target) Is Nothing Then Exit Sub
Application.EnableEvents = False
r.Value = 0.75 * r.Value
Application.EnableEvents = True
End Sub

If you enter a value in cell B9, it will automatically be reduced to 75% of
the typed value.

Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm

--
Gary''s Student - gsnu200909


"Sherees" wrote:

Is it possible that when we enter a number in a cell, the same cell should
display the entered number after deducting certain percentage. This macro
should run automatically when the excel file is open
--
Life isa journey not a destination


--
Life isa journey not a destination
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
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
run macro with input msg based on cell input Janelle S Excel Discussion (Misc queries) 0 January 20th 08 06:23 AM
Cell display after input swiftcode Excel Discussion (Misc queries) 4 September 20th 07 11:12 AM
Cell Input ~ Display Ronnie Excel Discussion (Misc queries) 2 July 16th 07 05:08 PM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM


All times are GMT +1. The time now is 03:59 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"