Macro for Selecting Cells within a Range

T

ToddS

I am a novice macro writer and need help with the following. Here is a piece
of a macro I recorded:

Range("P:p,N:N,L:L,J:J,G:G").Select
Selection.NumberFormat = "#,##0.0_);(#,##0.0)"

The end result I am shooting for is to change the number format as described
above but only for certain cells within the columns I have named in the first
line. Can I modify that line to include the names of these cells or is it
more complicated than this? Help!
 
T

ToddS

I guess I should've clarified. I have a list of bases in column B. there
are certain bases that must be included (effectively EXCLUDING the remainder)
in this range of other columns to which I am applying the formatting (the
columns in the line below - P, N, L, J and G) and I wasn't sure how to refer
to them in the macro.
 

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