The count of used columns uses the column property, so your code would be as
follows.....
MyCols = ActiveSheet.UsedRange.Column.Count
Cheers
N
"Stan" wrote in message
...
I have this small macro that I am using but I can not
figure out how to add to it so it will fill to the right.
I use this macro on various sheets so the amount of
columns and rows change. I would also like to change this
row to Bold font. tia
MyRows = ActiveSheet.UsedRange.Rows.Count
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-" & MyRows & "]c:R[-
1]C,0)"
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---