![]() |
CountIF in VBA
Good afternoon, Is there anyway that I can use the CountIF function in a macro that would allow me to determine the number of "No" values in a row. This is what I have so far, but it does not work this way... any suggestions are appreciated Dim rng As range dim intErrors as integer Set Rng = ws.Range(ws.Cells(k, 6), ws.Cells(k, 255)) intErrors = CountIF(Rng, "No") Thanks Larry -- lbargers ------------------------------------------------------------------------ lbargers's Profile: http://www.excelforum.com/member.php...o&userid=32798 View this thread: http://www.excelforum.com/showthread...hreadid=545263 |
CountIF in VBA
intErrors = Application.CountIF(Rng, "No")
-- HTH Bob Phillips (replace xxxx in email address with googlemail if mailing direct) "lbargers" wrote in message ... Good afternoon, Is there anyway that I can use the CountIF function in a macro that would allow me to determine the number of "No" values in a row. This is what I have so far, but it does not work this way... any suggestions are appreciated Dim rng As range dim intErrors as integer Set Rng = ws.Range(ws.Cells(k, 6), ws.Cells(k, 255)) intErrors = CountIF(Rng, "No") Thanks Larry -- lbargers ------------------------------------------------------------------------ lbargers's Profile: http://www.excelforum.com/member.php...o&userid=32798 View this thread: http://www.excelforum.com/showthread...hreadid=545263 |
CountIF in VBA
Thanks bo -- lbarger ----------------------------------------------------------------------- lbargers's Profile: http://www.excelforum.com/member.php...fo&userid=3279 View this thread: http://www.excelforum.com/showthread.php?threadid=54526 |
All times are GMT +1. The time now is 01:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com