Home |
Search |
Today's Posts |
#5
![]() |
|||
|
|||
![]()
Hi Desiree,
Sorry had not read the question completely before starting an answer to notice that you were writing a macro anyway/ The correct group for macro questions is the programming group, but mentioning the macro at least told us you know how to install a macro. you might compare this to the solution you were already provided, it will reduce the cells processed to those in the selection range that are numeric constants. Sub macro11() Dim cell As Range, rng As Range Set rng = Intersect(Selection, _ Cells.SpecialCells(xlCellTypeConstants, xlNumbers)) If Not rng Is Nothing Then For Each cell In rng cell = cell * 1000 Next cell End If End Sub The use of SpecialCells automatically limit the range to the usedrange and the the operands are limiting it furtyer to constants which are numeric. So you could apply it to entire columns without trying to process each cell. More on use of SpecialCell in http://www.mvps.org/dmcritchie/excel/proper.htm with additional portions in formula.htm The rest was that I hadn't noticed you were looking for a macro solution. Anything that shows a specific range is kind of a warning that the solution is not a generic one and that is why it first caught my attention. For a non macro solution: For multiplying cells a user specified range by 1000. Anyway non macro solution. Place 1000 into a cell, and copy it Ctrl+C Then make a selection of the cells you want to change, then. Edit menu, Paste Special, multiply This solution will work on both constants and formula, may look a little messy if you multiply formulas but you get what you ask for. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trying to group cells so that I can sort the upper most cell with. | New Users to Excel | |||
when adding cells resulting from tax calulations they do not equa. | Excel Discussion (Misc queries) | |||
Adding colour to a range of cells based on one of the cells v... | Excel Discussion (Misc queries) | |||
Adding formatted cells to an outline ? | Excel Discussion (Misc queries) | |||
Adding cells with numbers and text | Excel Worksheet Functions |