Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help for applying formula
Hi All,
3*2 3*3 3*2 3*4 3*4 3*4 3*2 3*2 3*5 3*5 3*4 3*4 3*4 3*4 3*5 3*5 3*5 3*5 3*4 3*4 3*4 3*4 3*4 3*4 3*2 3*2 3*3 3*3 I have following kind of data i want to convert the above column into following , how can i do that =3*2 =3*3 =3*2 =3*4 =3*4 =3*4 =3*2 =3*2 =3*5 =3*5 =3*4 =3*4 =3*4 =3*4 =3*5 =3*5 =3*5 =3*5 =3*4 =3*4 =3*4 =3*4 =3*4 =3*4 =3*2 =3*2 =3*3 =3*3 Can i do it using the help of macro ? Regards, Raan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help for applying formula
Actually, if you don't have many columns of data to convert
you can do what you want WITHOUT the help of a macro using this method: From the Excel Main Menu: <tools<options<transition ....Check: Transition Formula Entry...Click [OK] Then...select a column of data <data<text-to-columns....Click [Finish] (repeat for the remaining columns) <tools<options<transition ....UNCheck: Transition Formula Entry...Click [OK] However, if you prefer a macro...try this: Sub ConvertToFormula() Dim cCell As Range Dim cContents Dim cNewContents For Each cCell In Selection.Cells If cCell.Formula < "" Then On Error Resume Next 'Get the current cell contents cContents = cCell.Formula 'Build the new contents cNewContents = "=" & cContents 'Try using the new contents cCell.Formula = cNewContents If IsError(cCell) Then 'Restore the previous contents cCell.Formula = cContents End If End If Next cCell End Sub To use that macro: Select the range of cell to be impacted. [ALT]+[F8].....to see the list of available macros Select ConvertToFormula Press [ENTER] Does that help? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "Raan" wrote in message ... Hi All, 3*2 3*3 3*2 3*4 3*4 3*4 3*2 3*2 3*5 3*5 3*4 3*4 3*4 3*4 3*5 3*5 3*5 3*5 3*4 3*4 3*4 3*4 3*4 3*4 3*2 3*2 3*3 3*3 I have following kind of data i want to convert the above column into following , how can i do that =3*2 =3*3 =3*2 =3*4 =3*4 =3*4 =3*2 =3*2 =3*5 =3*5 =3*4 =3*4 =3*4 =3*4 =3*5 =3*5 =3*5 =3*5 =3*4 =3*4 =3*4 =3*4 =3*4 =3*4 =3*2 =3*2 =3*3 =3*3 Can i do it using the help of macro ? Regards, Raan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
help for applying formula
You literally want to add "=" into each of the cells? or do you want the
calculation to run? "Raan" wrote in message ... Hi All, 3*2 3*3 3*2 3*4 3*4 3*4 3*2 3*2 3*5 3*5 3*4 3*4 3*4 3*4 3*5 3*5 3*5 3*5 3*4 3*4 3*4 3*4 3*4 3*4 3*2 3*2 3*3 3*3 I have following kind of data i want to convert the above column into following , how can i do that =3*2 =3*3 =3*2 =3*4 =3*4 =3*4 =3*2 =3*2 =3*5 =3*5 =3*4 =3*4 =3*4 =3*4 =3*5 =3*5 =3*5 =3*5 =3*4 =3*4 =3*4 =3*4 =3*4 =3*4 =3*2 =3*2 =3*3 =3*3 Can i do it using the help of macro ? Regards, Raan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
applying a formula to an entire spreadsheet | Excel Worksheet Functions | |||
Applying a cell format within a Formula | Excel Discussion (Misc queries) | |||
applying formula | Excel Discussion (Misc queries) | |||
Applying colour to my Formula | Excel Discussion (Misc queries) | |||
Applying formula when a particular value occurs | Excel Programming |