Macro for Excel line formatting


Posted by nik on July 13, 2001 12:54 PM

Hi,

I wanted to create a macro to do the following.

1. staring from row 1 to n (in current sheet)
2. (In every row) if cell1 AND cell2 are empty, delete the line.
3. (In every row) if cell1 AND cell2 are NOT empty, assign the following properties to the line :
....(a) Bold
....(b) Italic
....(c) Shade with grey

How do I do this...

Any help is greatly appretiated...

Thanx

Nick



Posted by Kevin James on July 13, 2001 1:03 PM

After using your macro recorder to record the steps above, go into VBA (ALT-F11) and view the code. That should help get you started.

An excellent book I just finished reading is Excel2000 Programming for Dummies. I bought it from Amazon.com. It taught me the above and much more.