Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a cell i want to multiply by 9. I have a lot of them. So I'd like a
macro with a shortcut to do it for me. For Example: cell c62 has a value of 177. I want it to have a value of 1593. Instead of manually editing each cell (F2, home,=,end,*,9,enter) each and every time, a macro here would save lots of time. Unfortunately when I write the macro, it works on the first cell I wrote it on, but when I execute it on other cells it gives me the same value of 1593 for each cell i try it on. It just inserts the formula =177*9 and the value 1593. Can anyone please help?? I'm stuck and it would sure help. Thanks. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this.
First make a backup of your data, then put 9 in an empty cell, make sure the cell is formatted the same way as the cells you want to change, then copy the cell with 9, select all data you want to multiply and do editpaste special and select multiply -- Regards, Peo Sjoblom "sharon" wrote in message ... I have a cell i want to multiply by 9. I have a lot of them. So I'd like a macro with a shortcut to do it for me. For Example: cell c62 has a value of 177. I want it to have a value of 1593. Instead of manually editing each cell (F2, home,=,end,*,9,enter) each and every time, a macro here would save lots of time. Unfortunately when I write the macro, it works on the first cell I wrote it on, but when I execute it on other cells it gives me the same value of 1593 for each cell i try it on. It just inserts the formula =177*9 and the value 1593. Can anyone please help?? I'm stuck and it would sure help. Thanks. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Post a copy of your macro, then we can advise on how to amend it.
Pete On Sep 30, 8:17 pm, sharon wrote: I have a cell i want to multiply by 9. I have a lot of them. So I'd like a macro with a shortcut to do it for me. For Example: cell c62 has a value of 177. I want it to have a value of 1593. Instead of manually editing each cell (F2, home,=,end,*,9,enter) each and every time, a macro here would save lots of time. Unfortunately when I write the macro, it works on the first cell I wrote it on, but when I execute it on other cells it gives me the same value of 1593 for each cell i try it on. It just inserts the formula =177*9 and the value 1593. Can anyone please help?? I'm stuck and it would sure help. Thanks. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You could put the following code in a module and assign it a shortcut key
such as Ctrl+m then select a cell and press Ctrl+m. If the cell is numeric, the code multiplies the cell by 9. Sub Multiply_by_9() If IsNumeric(ActiveCell) Then ActiveCell = ActiveCell * 9 End If End Sub "sharon" wrote in message ... I have a cell i want to multiply by 9. I have a lot of them. So I'd like a macro with a shortcut to do it for me. For Example: cell c62 has a value of 177. I want it to have a value of 1593. Instead of manually editing each cell (F2, home,=,end,*,9,enter) each and every time, a macro here would save lots of time. Unfortunately when I write the macro, it works on the first cell I wrote it on, but when I execute it on other cells it gives me the same value of 1593 for each cell i try it on. It just inserts the formula =177*9 and the value 1593. Can anyone please help?? I'm stuck and it would sure help. Thanks. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub times9()
' ' times9 Macro ' multiply cell contents by 9 ' ' Keyboard Shortcut: Ctrl+r ' ActiveCell.FormulaR1C1 = "=5*9" Range("C5").Select End Sub "Pete_UK" wrote: Post a copy of your macro, then we can advise on how to amend it. Pete On Sep 30, 8:17 pm, sharon wrote: I have a cell i want to multiply by 9. I have a lot of them. So I'd like a macro with a shortcut to do it for me. For Example: cell c62 has a value of 177. I want it to have a value of 1593. Instead of manually editing each cell (F2, home,=,end,*,9,enter) each and every time, a macro here would save lots of time. Unfortunately when I write the macro, it works on the first cell I wrote it on, but when I execute it on other cells it gives me the same value of 1593 for each cell i try it on. It just inserts the formula =177*9 and the value 1593. Can anyone please help?? I'm stuck and it would sure help. Thanks. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks, I'll try this, too as soon as i figure out what a module is and where
they live (not being sarcastic, just don't know). Peo's solution worked as well, but obliterated the original number (i.e. no formula to see what i did) Thanks Peo that made short work of many many manual edifications. "Wondering" wrote: You could put the following code in a module and assign it a shortcut key such as Ctrl+m then select a cell and press Ctrl+m. If the cell is numeric, the code multiplies the cell by 9. Sub Multiply_by_9() If IsNumeric(ActiveCell) Then ActiveCell = ActiveCell * 9 End If End Sub "sharon" wrote in message ... I have a cell i want to multiply by 9. I have a lot of them. So I'd like a macro with a shortcut to do it for me. For Example: cell c62 has a value of 177. I want it to have a value of 1593. Instead of manually editing each cell (F2, home,=,end,*,9,enter) each and every time, a macro here would save lots of time. Unfortunately when I write the macro, it works on the first cell I wrote it on, but when I execute it on other cells it gives me the same value of 1593 for each cell i try it on. It just inserts the formula =177*9 and the value 1593. Can anyone please help?? I'm stuck and it would sure help. Thanks. |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The macros suggested will also obliterate the original number.
As far as "made short work" just open the backup copy you made before you tried Peo's suggestion. Gord Dibben MS Excel MVP On Sun, 30 Sep 2007 13:36:01 -0700, sharon wrote: Peo's solution worked as well, but obliterated the original number (i.e. no formula to see what i did) Thanks Peo that made short work of many many manual edifications. |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Are you multiplying a bunch of numbers one after another down a column or
just here and there in the spreadsheet? "sharon" wrote in message ... Thanks, I'll try this, too as soon as i figure out what a module is and where they live (not being sarcastic, just don't know). Peo's solution worked as well, but obliterated the original number (i.e. no formula to see what i did) Thanks Peo that made short work of many many manual edifications. "Wondering" wrote: You could put the following code in a module and assign it a shortcut key such as Ctrl+m then select a cell and press Ctrl+m. If the cell is numeric, the code multiplies the cell by 9. Sub Multiply_by_9() If IsNumeric(ActiveCell) Then ActiveCell = ActiveCell * 9 End If End Sub "sharon" wrote in message ... I have a cell i want to multiply by 9. I have a lot of them. So I'd like a macro with a shortcut to do it for me. For Example: cell c62 has a value of 177. I want it to have a value of 1593. Instead of manually editing each cell (F2, home,=,end,*,9,enter) each and every time, a macro here would save lots of time. Unfortunately when I write the macro, it works on the first cell I wrote it on, but when I execute it on other cells it gives me the same value of 1593 for each cell i try it on. It just inserts the formula =177*9 and the value 1593. Can anyone please help?? I'm stuck and it would sure help. Thanks. |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
a few are contigous but others are here and there.
"Wondering" wrote: Are you multiplying a bunch of numbers one after another down a column or just here and there in the spreadsheet? "sharon" wrote in message ... Thanks, I'll try this, too as soon as i figure out what a module is and where they live (not being sarcastic, just don't know). Peo's solution worked as well, but obliterated the original number (i.e. no formula to see what i did) Thanks Peo that made short work of many many manual edifications. "Wondering" wrote: You could put the following code in a module and assign it a shortcut key such as Ctrl+m then select a cell and press Ctrl+m. If the cell is numeric, the code multiplies the cell by 9. Sub Multiply_by_9() If IsNumeric(ActiveCell) Then ActiveCell = ActiveCell * 9 End If End Sub "sharon" wrote in message ... I have a cell i want to multiply by 9. I have a lot of them. So I'd like a macro with a shortcut to do it for me. For Example: cell c62 has a value of 177. I want it to have a value of 1593. Instead of manually editing each cell (F2, home,=,end,*,9,enter) each and every time, a macro here would save lots of time. Unfortunately when I write the macro, it works on the first cell I wrote it on, but when I execute it on other cells it gives me the same value of 1593 for each cell i try it on. It just inserts the formula =177*9 and the value 1593. Can anyone please help?? I'm stuck and it would sure help. Thanks. |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
it was ok that peo's suggestion wiped out the original number. though i would
have preferred the formula to the final value, but i just footnoted the multiplier so it worked out fine. thank you. "Gord Dibben" wrote: The macros suggested will also obliterate the original number. As far as "made short work" just open the backup copy you made before you tried Peo's suggestion. Gord Dibben MS Excel MVP On Sun, 30 Sep 2007 13:36:01 -0700, sharon wrote: Peo's solution worked as well, but obliterated the original number (i.e. no formula to see what i did) Thanks Peo that made short work of many many manual edifications. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Don't think it's possible, but I thought I would ask. | Excel Worksheet Functions | |||
Simple Formula (I thought) | Excel Worksheet Functions | |||
I THOUGHT I knew what I was doing | Charts and Charting in Excel | |||
This is A LOT harder than I thought it would be | Excel Discussion (Misc queries) | |||
On second thought ... | New Users to Excel |