View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Add an exception rule

Hotherps,

You could use Countif to check the row

If worksheetfunction.countif(Rows(1),".") = 6 then
...

--

HTH

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

"hotherps " wrote in message
...
Here is the code I am using.


If .Cells(x, y).Value = "." _
And counter < 6 _
And need2 0 Then
Cells(x, y).Value = "Test"


Is there a way I can have the code look forward down the row to see if
it can be placed 6 times?

There are many reasons it could come up short, and I'm trying to avoid
having an incomplete row. I want the value to appear 6 times or not at
all.

I would prefer the code to just continue on through the rows until it
can add all 6 cells again.

Thanks


---
Message posted from http://www.ExcelForum.com/