How do I apply a formula to #s already typed in a series of cells

G

Guest

I have a spreadsheet where I already have several hundred numbers typed in as
whole numbers. Is there a way to apply a formula to the whole section that
will round each of the pre-typed numbers to the nearest thousand.

I know how to do it using =ROUND on a cell by cell basis, but that would
take me forever.

Please help!
 
D

Don Guillett

one way
Sub placformulaetoround()
For Each c In Range("a2:a" & Cells(Rows.Count, "a").End(xlUp).Row)
c.Value = Round(c / 1000, 0) * 1000
Next c
End Sub
 

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

Top