Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding a percentage to a figure | Excel Worksheet Functions | |||
How do I show what the percentage is of one figure to another? | Excel Worksheet Functions | |||
Adding a figure + a percentage after using lesser than or greater | Excel Discussion (Misc queries) | |||
Need formula to figure out percentage of change for 5 years | Excel Discussion (Misc queries) | |||
Need to figure out a percentage | Excel Discussion (Misc queries) |