LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
David McRitchie
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to group cells so that I can sort the upper most cell with. magnetoworld New Users to Excel 8 March 14th 05 07:17 PM
when adding cells resulting from tax calulations they do not equa. Marty Excel Discussion (Misc queries) 1 March 14th 05 02:38 PM
Adding colour to a range of cells based on one of the cells v... McKenna Excel Discussion (Misc queries) 4 March 11th 05 02:25 PM
Adding formatted cells to an outline ? Glenn Excel Discussion (Misc queries) 4 January 11th 05 04:10 PM
Adding cells with numbers and text EddieZ Excel Worksheet Functions 4 November 9th 04 12:43 PM


All times are GMT +1. The time now is 11:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"