How Do I get percentage of any figure in same Cell
Howdy Macpod
I typed in the code (thanks for that one) but encountered the folowing errors.
First, i put in the new val and nothing happended. then I scrolled over the
cell and it multiplyied by the 1.25. However, ever time I move to cell, it
incresses by the 1.25.
Is there somthing small that will only multiply when I change the value, and
wont keep multiplying when I scroll back over.
Cheers for all the help
"macropod" wrote:
Hi D,
True. If you want an automated solution, then a macro along the lines of the following should do the job.
Sub worksheet_change(ByVal Target As Range)
If Intersect(Target, ActiveSheet.Range("A1:J10")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target.Value = 1.25 * Target.Value
Application.EnableEvents = True
End Sub
To use the macro, press Alt-F11, then click on your worksheet's name (expand the objects listing for your workbook if necessary),
then click on whichever worksheet you want the macro to act on. Adjust the range ("A1:J10") above to suit your requirements and
you're in business.
Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------
"D" wrote in message ...
Cheers man,
But just wondering, that if some one chose to move the figure from 10 to 11,
then the 1.25 would not be 25% of the figure, hence, I would have to use the
copy paste function again.
What i need is somthing that will multiply 25% onto every manually inserted
figure, but the manually inserted figure should be able to change at will,
but still be multiplyed by 25%.
Nice on thou, I have still learn't somthing.
"macropod" wrote:
Hi D,
Enter 1.25 into an unused cell
Copy the 1.25
Select the range you want to increase by 25%
Choose Edit|Paste Special|Values|Multiply
Delete the 1.25 from the cell you entered it into.
Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------
"D" wrote in message ...
Howdy Folks.
Example
In cell A1
Can I enter any figure and then add 25% to it, but it updates in the same
cell, rather than adding two cells together.
Cheers.
D
|