Formatting Via a Macro

  • Thread starter Thread starter wilro85
  • Start date Start date
W

wilro85

Is it possible to format sheets (visualize an inventory sheet with white
row - grey row - white row - grey row) via macros?

I currently have the sheets set up so that people can just type in what
they need. However, often people will cut/copy/paste/drag/fill down,
etc and it messes up the formatting I have on the sheet.

Is there a way to set the colors & borders via a macro?
 
You can do that with macro's however I would recommend conditional
formatting.
Select all cells
Go To:
Format Menu...
Conditional Formating...
Click "Cell Value Is" and Change to "Formula Is"
Type this for the formula:
=MOD(ROW(),2) = 0
Click "Format..."
Click the "Patterns" Tab
Select new background tab
Click ok twice
 
Use conditional formatting with a formula of

=MOD(ROW(),2)=0

then it adjusts automatically.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
In cond.format / formula is
=MOD(ROW();2)=1
pick ur color

copy format to all wanted cells
 

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