ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How Do I get percentage of any figure in same Cell (https://www.excelbanter.com/excel-programming/386428-how-do-i-get-percentage-any-figure-same-cell.html)

D

How Do I get percentage of any figure in same Cell
 
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

macropod

How Do I get percentage of any figure in same Cell
 
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


joel

How Do I get percentage of any figure in same Cell
 
add another column. Add the data to cell A1, then if cell B1 have the
formula =1.25*A1

"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



D

How Do I get percentage of any figure in same Cell
 
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



D

How Do I get percentage of any figure in same Cell
 
Cheers Joel.
But that would give me two coloums, one for the orignal value, the other
with the answer, I just want it so that I enter 10 in the cell, and it auto
adds 25% to it giving me 12.50, So bascaly in cell A1, if I type in 10 and
then click out of the cell, cell A1 should say 12.50.

Cheers thou

"Joel" wrote:

add another column. Add the data to cell A1, then if cell B1 have the
formula =1.25*A1

"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



joel

How Do I get percentage of any figure in same Cell
 
You can use a worksheet_change event like below if you had only certain cells
you want to apply the 1.25 multplication


Sub worksheet_change(ByVal Target As Range)

Application.EnableEvents = False

If Target.Row = 1 And Target.Column = 1 Then
Target.Value = 1.25 * Target.Value
End If

Application.EnableEvents = True

End Sub


"D" wrote:

Cheers Joel.
But that would give me two coloums, one for the orignal value, the other
with the answer, I just want it so that I enter 10 in the cell, and it auto
adds 25% to it giving me 12.50, So bascaly in cell A1, if I type in 10 and
then click out of the cell, cell A1 should say 12.50.

Cheers thou

"Joel" wrote:

add another column. Add the data to cell A1, then if cell B1 have the
formula =1.25*A1

"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


D

How Do I get percentage of any figure in same Cell
 
cheers mate.
i will give this a bash.
Nice one.

"Joel" wrote:

You can use a worksheet_change event like below if you had only certain cells
you want to apply the 1.25 multplication


Sub worksheet_change(ByVal Target As Range)

Application.EnableEvents = False

If Target.Row = 1 And Target.Column = 1 Then
Target.Value = 1.25 * Target.Value
End If

Application.EnableEvents = True

End Sub


"D" wrote:

Cheers Joel.
But that would give me two coloums, one for the orignal value, the other
with the answer, I just want it so that I enter 10 in the cell, and it auto
adds 25% to it giving me 12.50, So bascaly in cell A1, if I type in 10 and
then click out of the cell, cell A1 should say 12.50.

Cheers thou

"Joel" wrote:

add another column. Add the data to cell A1, then if cell B1 have the
formula =1.25*A1

"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


macropod

How Do I get percentage of any figure in same Cell
 
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




D

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




D

How Do I get percentage of any figure in same Cell
 
Howdy Joel.

i inserted your code, but nothing happended upon testing.

dose Target row = 1 and target coloum = 1 refer to cell A1 ?
Cheers
daragh.

"Joel" wrote:

You can use a worksheet_change event like below if you had only certain cells
you want to apply the 1.25 multplication


Sub worksheet_change(ByVal Target As Range)

Application.EnableEvents = False

If Target.Row = 1 And Target.Column = 1 Then
Target.Value = 1.25 * Target.Value
End If

Application.EnableEvents = True

End Sub


"D" wrote:

Cheers Joel.
But that would give me two coloums, one for the orignal value, the other
with the answer, I just want it so that I enter 10 in the cell, and it auto
adds 25% to it giving me 12.50, So bascaly in cell A1, if I type in 10 and
then click out of the cell, cell A1 should say 12.50.

Cheers thou

"Joel" wrote:

add another column. Add the data to cell A1, then if cell B1 have the
formula =1.25*A1

"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


macropod

How Do I get percentage of any figure in same Cell
 
Hi D,

If you copy the code and paste it into the worksheet object, it will work as advertised. It sounds as if you typed the code into a
Worksheet_SelectionChange sub.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"D" wrote in message ...
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





D

How Do I get percentage of any figure in same Cell
 
Howdy Mac.
that was awsome, but the problem I should have said is that I need this for
a few diferent cells, but they are more sort of random cells, rather than
whole ranges.
Any tips .
cheers.
d

"macropod" wrote:

Hi D,

If you copy the code and paste it into the worksheet object, it will work as advertised. It sounds as if you typed the code into a
Worksheet_SelectionChange sub.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"D" wrote in message ...
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






macropod

How Do I get percentage of any figure in same Cell
 
Hi D,

You could change
..Range("A1:J10")
to
..Range("A1,B3,C4")

Another way, so that you don't have to keep adding/deleting ranges in the code would be to change
..Range("A1:J10")
to
..Range("Add25PC")
and create a named range (via Insert|Name), named 'Add25PC', for the ranges you want to apply the macro to. To add/delete cells
to/from the macro's scope, you could then change the ranges named.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"D" wrote in message ...
Howdy Mac.
that was awsome, but the problem I should have said is that I need this for
a few diferent cells, but they are more sort of random cells, rather than
whole ranges.
Any tips .
cheers.
d

"macropod" wrote:

Hi D,

If you copy the code and paste it into the worksheet object, it will work as advertised. It sounds as if you typed the code into
a
Worksheet_SelectionChange sub.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"D" wrote in message ...
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








All times are GMT +1. The time now is 03:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com