problem using VBA in Excel

S

schreena

Good Day,

I am having problem on highlighting rows based on my input in Exce
using VBA.

I do not know how to do this :

If my input(in sheet 1 ) is 8, then, i want VBA in excel to generate
rows highlighted in yellow automatically(in sheet 2).
There must be 2 blank rows which is separating each yellow line tha
has been generated.

Pls refer to my attachement if you don't understand my explanations
The one i did in the attachement is manually done.

Thank you

regards
Reen

Attachment filename: problem.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=55066
 
B

Bob Phillips

Use Conditional Formatting (Format>Conditional Formatting>

Select rows 1-24
Go to CF
Change Condition 1 to Is Formula
Add a formula of =MOD(ROW(),3)=1
Click the Format button
Select the pattern tab
Choose the yellow
Exit CF

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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