View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default looping through columns and rows


something like this
for i=1 to cells(rows.count,"a").end(xlup).row
if cells(i,"a")="criteria" then mc=mc+1
next i
msgbox mc

--
Don Guillett
SalesAid Software

"Guerilla" wrote in message
oups.com...
Hello,

Can someone show me the code which would allow me to search through a
number
of rows and columns, to identify a criteria. Each time the criteria
is
found, 1 is added to a variable. When the variable reaches a set
number, the
search moves to a different column.

This would allow me to allocate people to jobs according to their
first,
second, third choice etc, without resourcing too many people to a job.

can you help? I have very little experience, but am usually able to
see
what is happening in the code and expend on it to take care of more
elements.

kind regards,

Matt