Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a set of values that I want to replace with 10x (or another factor) scaled ones.

Since I have to do it many times, is there any way to do it without calculating on separate cells and copying the values? Something like search/replace but with a function, and on a selected group of cells.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you are just looking to do a simple operation on that group of cells:

  • Enter the number in another cell (such as 10 if you are multiplying them by 10)
  • Copy that cell
  • Highlight the group of cells you want to modify
  • Do a Paste Special and select the operation

Edit: Another option is this, if you don't mind working with VB. Create a macro like this:

Sub ModCells()
Range(Selection, Selection.End(xlDown)).Select

For Each cell In Selection
      cell.Value = cell.Value / 10
Next
End Sub

And then you can select the cells and just run the macro.

share|improve this answer
    
So it's not a simple operation, but "10x (or another factor) scaled ones" is actually multiple operations to get the final value? –  jb11 Jun 11 '12 at 14:10
    
It's not like calculating in a different group of cells and copy/pasting (moving) them over the original values. You just put a "10" in a single cell and copy it. Then you select the group of cells you want to divide by 10. Then Right-Click -> Paste Special -> Divide and all of those cells will be divided by 10. You aren't pasting values over, you are pasting the result of the operation which automatically modifies all of those cells. –  jb11 Jun 11 '12 at 14:20
    
I added a VB solution in my original answer. –  jb11 Jun 11 '12 at 14:37
    
sorry I didn't get it properly...it works well!! –  clabacchio Jun 11 '12 at 14:37
    
Good, I'm glad it works for you. –  jb11 Jun 11 '12 at 14:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.