Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi All,
I have just written a macro for converting all text zeros to number zeros in a given selection of range of cells. I thought I would share this with the group from which I learnt so many new things. Apologies if this topic is already dealt before (i searched but didnt find any). This macro puts "1" in IV65536 and multiplies the selection with this before clearing the cell IV65536. Here is the macro: -------------------------------------------------------------------------------------------------------------------- Application.Goto Reference:="R1C1" Dim MySelection As Range Set MySelection = Application.InputBox(prompt:="Select a range of cells", Type:=8) Application.Goto Reference:="R65536C256" ActiveCell.FormulaR1C1 = "1" Selection.Copy MySelection.Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _ SkipBlanks:=False, Transpose:=False Application.Goto Reference:="R65536C256" Range("IV65536").Select Selection.ClearContents MySelection.Select ---------------------------------------------------------------------------------------------------------------------- Thanks, Prasanth Dangeti |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to copy a number into a text cell, keeping leading zeros? | Charts and Charting in Excel | |||
Losing zeros at the beginning of a number | Excel Discussion (Misc queries) | |||
leading zeros when uploading a number from text file | Excel Discussion (Misc queries) | |||
save text field w/ leading zeros in .csv format & not lose zeros? | Excel Discussion (Misc queries) | |||
zero supress leading zeros when chg format from text to number | Excel Worksheet Functions |