Column D x 2

  • Thread starter Thread starter TGalin
  • Start date Start date
T

TGalin

Column D has numbers in random cells. Is there a code that will look through
the cells in Column D for numbers and when it finds them multiply them by 2?
 
Sub multiplyby()
x = InputBox("multiple value ie: 2")
On Error Resume Next
For Each c In Columns("D").SpecialCells(xlCellTypeConstants, 23)
'If IsNumeric(c) Then c.Value = c * x
c.Value = c * x
Next c
End Sub
 
Just copy/paste into a macro module and execute from there. Make sure your
sheet is the active sheet at the time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top