Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to change of a cell
I need a macro to change a value of a cell from bits per million to %.
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to change of a cell
Hi MHD,
You should provide some additional detail as it is not immediately apparent what you seek to do, or why a macro should be required. Incidentally, if the earlier response was from you, a two minute gap between inititial post and a 'bump' seems imordinately impatient. --- Regards, Norman "mhd143" wrote in message ... I need a macro to change a value of a cell from bits per million to %. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to change of a cell
Basically i've a range of cells in bit per million, whcih i need to convert
in % E.g. 100(bits per million) * 100/1000000 = 1% I need a for each statement too so it only changes cells with a value greater than 0 please "Norman Jones" wrote: Hi MHD, You should provide some additional detail as it is not immediately apparent what you seek to do, or why a macro should be required. Incidentally, if the earlier response was from you, a two minute gap between inititial post and a 'bump' seems imordinately impatient. --- Regards, Norman "mhd143" wrote in message ... I need a macro to change a value of a cell from bits per million to %. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to change of a cell
Hi,
As Norman mentioned, it is not clear why you need a macro. Can you not do this with a formula? If necessary cut and paste the values back into the correct cells? Another way might be to copy 100/1000000 to your clipboard and paste special using the multiply option. Using a simple macro: Sub Test() For Each cell In Selection cell.Value = cell.Value * 100 / 1000000 Next cell End Sub You must have the range selected before you run the macro. Multiplying 0 by 100 / 1000000 will result in 0, presumably no need to test. Sean "mhd143" wrote in message ... Basically i've a range of cells in bit per million, whcih i need to convert in % E.g. 100(bits per million) * 100/1000000 = 1% I need a for each statement too so it only changes cells with a value greater than 0 please "Norman Jones" wrote: Hi MHD, You should provide some additional detail as it is not immediately apparent what you seek to do, or why a macro should be required. Incidentally, if the earlier response was from you, a two minute gap between inititial post and a 'bump' seems imordinately impatient. --- Regards, Norman "mhd143" wrote in message ... I need a macro to change a value of a cell from bits per million to %. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to change of a cell
Thanks Sean
"Sean Bartleet" wrote: Hi, As Norman mentioned, it is not clear why you need a macro. Can you not do this with a formula? If necessary cut and paste the values back into the correct cells? Another way might be to copy 100/1000000 to your clipboard and paste special using the multiply option. Using a simple macro: Sub Test() For Each cell In Selection cell.Value = cell.Value * 100 / 1000000 Next cell End Sub You must have the range selected before you run the macro. Multiplying 0 by 100 / 1000000 will result in 0, presumably no need to test. Sean "mhd143" wrote in message ... Basically i've a range of cells in bit per million, whcih i need to convert in % E.g. 100(bits per million) * 100/1000000 = 1% I need a for each statement too so it only changes cells with a value greater than 0 please "Norman Jones" wrote: Hi MHD, You should provide some additional detail as it is not immediately apparent what you seek to do, or why a macro should be required. Incidentally, if the earlier response was from you, a two minute gap between inititial post and a 'bump' seems imordinately impatient. --- Regards, Norman "mhd143" wrote in message ... I need a macro to change a value of a cell from bits per million to %. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro that will change the font of a cell if i change a value | Excel Discussion (Misc queries) | |||
Macro to change part of cell | Excel Discussion (Misc queries) | |||
Macro on Cell change | Excel Discussion (Misc queries) | |||
Please help! Macro to change cell contents based on cell to the left | Excel Programming | |||
Run Macro if certain cell change | Excel Programming |